summaryrefslogtreecommitdiffstats
path: root/Modules/gdbmmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/gdbmmodule.c')
-rw-r--r--Modules/gdbmmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c
index 0190a9b..505ce92 100644
--- a/Modules/gdbmmodule.c
+++ b/Modules/gdbmmodule.c
@@ -477,7 +477,8 @@ dbmopen(PyObject *self, PyObject *args)
break;
#endif
default:
- sprintf(buf, "Flag '%c' is not supported.", *flags);
+ PyOS_snprintf(buf, sizeof(buf), "Flag '%c' is not supported.",
+ *flags);
PyErr_SetString(DbmError, buf);
return NULL;
}