Menu

#61 Fix for stack corruption in mp3_parse.cpp

open
nobody
None
5
2004-04-19
2004-04-19
Anonymous
No

File: mp3_parse.cpp
Id: mp3_parse.cpp,v 1.6 2002/11/02 17:48:51 t1mpy Exp
Line: 468

const size_t VBR_HEADER_MAX_SIZE = 116;

should be changed to

const size_t VBR_HEADER_MAX_SIZE = 120;

since we have the following expression calculating the
header size:

int vbr_header_size = VBR_HEADER_MIN_SIZE
+ ((vbr_flags & FRAMES_FLAG)? 4:0)
+ ((vbr_flags & BYTES_FLAG)? 4:0)
+ ((vbr_flags & TOC_FLAG)? 100:0)
+ ((vbr_flags & SCALE_FLAG)? 4:0);

8+4+4+100+4 = 120, not 116.

Best regards,

Mikkel Bie

Discussion

  • Christopher Watford

    Logged In: YES
    user_id=1078204

    I have made a .patch for convenient patching. Attached below.

     
  • Christopher Watford

    Logged In: YES
    user_id=1078204

    Or not, I'll submit as new patch.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.