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/Demo/pysvr/pysvr.c b/Demo/pysvr/pysvr.c
index 99d7b07..50a122c 100644
--- a/Demo/pysvr/pysvr.c
+++ b/Demo/pysvr/pysvr.c
@@ -25,7 +25,7 @@
Python.h defines a typedef destructor, which conflicts with pthread.h.
So Python.h must be included after pthread.h. */
-#include <Python.h>
+#include "Python.h"
extern int Py_VerboseFlag;
@@ -364,6 +364,7 @@
ps(void)
{
char buffer[100];
- sprintf(buffer, "ps -l -p %d </dev/null | tail +2l\n", getpid());
+ PyOS_snprintf(buffer, sizeof(buffer),
+ "ps -l -p %d </dev/null | tail +2l\n", getpid());
system(buffer);
}