fix buffer issue in websafe filter

This commit is contained in:
steve
2008-06-19 23:02:46 -04:00
parent 0bf0e58956
commit 7de8a68256

View File

@@ -52,7 +52,7 @@ filters_uwebsafe(PyObject * self, PyObject *args)
command = PyUnicode_AS_UNICODE(com);
len = PyUnicode_GetSize(com);
buffer = (Py_UNICODE*)malloc(5*len*sizeof(Py_UNICODE));
buffer = (Py_UNICODE*)malloc(6*len*sizeof(Py_UNICODE));
for(ic = 0, ib = 0; ic < len; ic++, ib++) {
c = command[ic];
if (c == '&') {