Skip to content

Commit b600fe9

Browse files
committed
Switch arguments to memset (kudos to MSVC C4318 for finding that)
1 parent 512efb4 commit b600fe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/binascii.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ binascii_a2b_qp(PyObject *self, PyObject *args, PyObject *kwargs)
10461046
PyErr_NoMemory();
10471047
return NULL;
10481048
}
1049-
memset(odata, datalen, 0);
1049+
memset(odata, 0, datalen);
10501050

10511051
in = out = 0;
10521052
while (in < datalen) {
@@ -1220,7 +1220,7 @@ binascii_b2a_qp (PyObject *self, PyObject *args, PyObject *kwargs)
12201220
PyErr_NoMemory();
12211221
return NULL;
12221222
}
1223-
memset(odata, odatalen, 0);
1223+
memset(odata, 0, odatalen);
12241224

12251225
in = out = linelen = 0;
12261226
while (in < datalen) {

0 commit comments

Comments
 (0)