Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
python3-numpy.29613
CVE-2021-33430-bufovrflw-ctors-DoS.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2021-33430-bufovrflw-ctors-DoS.patch of Package python3-numpy.29613
From 16f7824b4d935b6aee98298ca4123d57174a6f2e Mon Sep 17 00:00:00 2001 From: yetanothercheer <yetanothercheer@protonmail.com> Date: Tue, 11 May 2021 14:28:37 +0800 Subject: [PATCH] BUG: fix potential buffer overflow(#18939) --- numpy/core/src/multiarray/ctors.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -929,6 +929,14 @@ PyArray_NewFromDescr_int( int i; npy_intp nbytes; + if ((unsigned int)nd > (unsigned int)NPY_MAXDIMS) { + PyErr_Format(PyExc_ValueError, + "number of dimensions must be within [0, %d]", + NPY_MAXDIMS); + Py_DECREF(descr); + return NULL; + } + if (descr->subarray) { PyObject *ret; npy_intp newdims[2*NPY_MAXDIMS]; @@ -948,14 +956,6 @@ PyArray_NewFromDescr_int( return ret; } - if ((unsigned int)nd > (unsigned int)NPY_MAXDIMS) { - PyErr_Format(PyExc_ValueError, - "number of dimensions must be within [0, %d]", - NPY_MAXDIMS); - Py_DECREF(descr); - return NULL; - } - /* Check datatype element size */ nbytes = descr->elsize; if (PyDataType_ISUNSIZED(descr)) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor