a1aa82164f
Fixed a buffer overrun error in libPQquoteBytea based on a fix by James Matthew Farrow. [Bug #838317]. bum PKGREVISION to 2 for the fix
48 lines
1.2 KiB
Text
48 lines
1.2 KiB
Text
$NetBSD: patch-aa,v 1.2 2004/08/05 22:20:11 recht Exp $
|
|
|
|
--- libpqmodule.c.orig 2004-08-03 20:20:48.000000000 +0200
|
|
+++ libpqmodule.c 2004-08-03 20:20:56.000000000 +0200
|
|
@@ -364,7 +364,6 @@
|
|
}
|
|
|
|
sout[j++] = (forArray ? '"' : '\'');
|
|
- sout[j] = (char)0;
|
|
|
|
result = Py_BuildValue("s#", sout, j);
|
|
PyMem_Free(sout);
|
|
@@ -411,8 +410,6 @@
|
|
}
|
|
}
|
|
|
|
- sout[j] = (char)0;
|
|
-
|
|
result = Py_BuildValue("s#", sout, j);
|
|
PyMem_Free(sout);
|
|
|
|
@@ -791,7 +788,7 @@
|
|
return PgInt8_FromString(s, (char **)NULL, 10);
|
|
}
|
|
|
|
- PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed");
|
|
+ PyErr_SetString(PyExc_TypeError, "a string or numeric is required");
|
|
return (PyObject *)NULL;
|
|
}
|
|
#endif
|
|
@@ -855,7 +852,7 @@
|
|
return PgInt2_FromString(s, (char **)NULL, 10);
|
|
}
|
|
|
|
- PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed");
|
|
+ PyErr_SetString(PyExc_TypeError, "a string or numeric is required");
|
|
return (PyObject *)NULL;
|
|
}
|
|
|
|
@@ -907,7 +904,7 @@
|
|
return libPQbool_FromString(self, args);
|
|
}
|
|
|
|
- PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed");
|
|
+ PyErr_SetString(PyExc_TypeError, "a string or numeric is required");
|
|
return (PyObject *)NULL;
|
|
}
|
|
|