This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: string_subscript doesn't check for failed PyMem_Malloc
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: Rhamphoryncus, nnorwitz
Priority: normal Keywords:

Created on 2005-10-19 12:07 by Rhamphoryncus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg26631 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2005-10-19 12:07
result_buf = PyMem_Malloc(slicelength);

for (cur = start, i = 0; i < slicelength; 
    cur += step, i++) {
        result_buf[i] = source_buf[cur];
}

It access result_buf without ever checking if it's NULL.
msg26632 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-20 04:16
Logged In: YES 
user_id=33168

Thanks!

Checked in as:
 * Objects/stringobject.c 2.234, 2.226.2.1
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42500
2005-10-19 12:07:50Rhamphoryncuscreate