Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
python-numpy-doc
CVE-2021-33430-bufovrflw-ctors-DoS.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2021-33430-bufovrflw-ctors-DoS.patch of Package python-numpy-doc
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 @@ -854,6 +854,14 @@ PyArray_NewFromDescr_int(PyTypeObject *s npy_intp largest; npy_intp size; + 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]; @@ -871,14 +879,6 @@ PyArray_NewFromDescr_int(PyTypeObject *s 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 dimensions */ size = 1; sd = (size_t) descr->elsize;
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