Skip to content

Commit

Permalink
CVE-2021-41495 Fix compiler error with older compilers, particularly …
Browse files Browse the repository at this point in the history
…Windows

Caused by there being a variable definition after the function start.

As an example:
libgit2/pygit2#53
  • Loading branch information
rickprice committed Sep 19, 2023
1 parent c085f5e commit b875e49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/core/src/multiarray/arrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ _strings_richcompare(PyArrayObject *self, PyArrayObject *other, int cmp_op,
int rstrip)
{
PyArrayObject *result;
PyObject *new;
PyArrayMultiIterObject *mit;
int val, cast = 0;

Expand All @@ -1025,7 +1026,7 @@ _strings_richcompare(PyArrayObject *self, PyArrayObject *other, int cmp_op,
return NULL;
}
unicode->elsize = PyArray_DESCR(other)->elsize;
PyObject *new = PyArray_FromAny((PyObject *)other,
new = PyArray_FromAny((PyObject *)other,
unicode, 0, 0, 0, NULL);
if (new == NULL) {
return NULL;
Expand Down

0 comments on commit b875e49

Please sign in to comment.