classification
Title: audioop.findmax() crashs with negative length
Type: Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: facundobatista, haypo
Priority: normal Keywords: patch

Created on 2008-07-06 21:57 by haypo, last changed 2008-07-07 17:03 by facundobatista. This issue is now closed.

Files
File name Uploaded Description Edit
audioop_findmax.patch haypo, 2008-07-06 21:57 Patch to fix described bug
Messages (2)
msg69356 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2008-07-06 21:57
Example:
>>> import audioop
>>> audioop.findmax(''.join( chr(x) for x in xrange(256)), -2392392)
Erreur de segmentation (core dumped)

The problem is that audioop_findmax() doesn't check len2 for negative 
value. Here is a patch ;-)
msg69391 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-07-07 17:03
Commited in r64775. Thank you very much!!
History
Date User Action Args
2008-07-07 17:03:22facundobatistasetstatus: open -> closed
resolution: accepted
messages: + msg69391
nosy: + facundobatista
2008-07-06 21:57:58haypocreate