Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(133)

Side by Side Diff: Modules/almodule.c

Issue 2599: python - fix buffer overflows in unicode processing and elsewhere SVN Base: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 1 year, 4 months ago , Downloaded from: http://bugs.python.org/file10825/issue2620-gps02-patch.txt
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 #define OLD_INTERFACE /* define for pre-Irix 6 interface */ 2 #define OLD_INTERFACE /* define for pre-Irix 6 interface */
3 3
4 #include "Python.h" 4 #include "Python.h"
5 #include "stringobject.h" 5 #include "stringobject.h"
6 #include <audio.h> 6 #include <audio.h>
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #ifndef AL_NO_ELEM 9 #ifndef AL_NO_ELEM
10 #ifndef OLD_INTERFACE 10 #ifndef OLD_INTERFACE
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 if (return_set == NULL) { 1626 if (return_set == NULL) {
1627 PyErr_NoMemory(); 1627 PyErr_NoMemory();
1628 goto cleanup; 1628 goto cleanup;
1629 } 1629 }
1630 1630
1631 retry: 1631 retry:
1632 nvals = alQueryValues(resource, param, return_set, setsize, quals, quals ize); 1632 nvals = alQueryValues(resource, param, return_set, setsize, quals, quals ize);
1633 if (nvals < 0) 1633 if (nvals < 0)
1634 goto cleanup; 1634 goto cleanup;
1635 if (nvals > setsize) { 1635 if (nvals > setsize) {
1636 ALvalue *old_return_set = return_set;
1636 setsize = nvals; 1637 setsize = nvals;
1637 PyMem_RESIZE(return_set, ALvalue, setsize); 1638 PyMem_RESIZE(return_set, ALvalue, setsize);
1638 if (return_set == NULL) { 1639 if (return_set == NULL) {
1640 return_set = old_return_set;
1639 PyErr_NoMemory(); 1641 PyErr_NoMemory();
1640 goto cleanup; 1642 goto cleanup;
1641 } 1643 }
1642 goto retry; 1644 goto retry;
1643 } 1645 }
1644 1646
1645 if (alGetParamInfo(resource, param, &pinfo) < 0) 1647 if (alGetParamInfo(resource, param, &pinfo) < 0)
1646 goto cleanup; 1648 goto cleanup;
1647 1649
1648 res = PyList_New(nvals); 1650 res = PyList_New(nvals);
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
3221 #ifdef AL_NO_ELEM /* IRIX 6 */ 3223 #ifdef AL_NO_ELEM /* IRIX 6 */
3222 (void) alSetErrorHandler(ErrorHandler); 3224 (void) alSetErrorHandler(ErrorHandler);
3223 #endif /* AL_NO_ELEM */ 3225 #endif /* AL_NO_ELEM */
3224 #ifdef OLD_INTERFACE 3226 #ifdef OLD_INTERFACE
3225 (void) ALseterrorhandler(ErrorHandler); 3227 (void) ALseterrorhandler(ErrorHandler);
3226 #endif /* OLD_INTERFACE */ 3228 #endif /* OLD_INTERFACE */
3227 3229
3228 error: 3230 error:
3229 return; 3231 return;
3230 } 3232 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497