mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
fix buffer issue in websafe filter
This commit is contained in:
@@ -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 == '&') {
|
||||
|
||||
Reference in New Issue
Block a user