sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c
index e34c002..7a8900d 100644
--- a/Modules/pcremodule.c
+++ b/Modules/pcremodule.c
@@ -263,7 +263,8 @@
case('U'): case('l'): case('u'):
{
char message[50];
- sprintf(message, "\\%c is not allowed", c);
+ PyOS_snprintf(message, sizeof(message),
+ "\\%c is not allowed", c);
PyErr_SetString(ErrorObject, message);
return NULL;
}
@@ -495,7 +496,7 @@
if (result==Py_None)
{
char message[50];
- sprintf(message,
+ PyOS_snprintf(message, sizeof(message),
"group did not contribute to the match");
PyErr_SetString(ErrorObject,
message);