Menu

#11 buffer overflow fix

closed-fixed
None
5
2009-04-27
2009-04-21
No

Attached patch fixes buffer overflow on some platforms.

Patch author: Manfred Tremmel

Discussion

  • Stanislav Brabec

    libmodplug-0.8.6-buffer_overflow.patch

     
  • Konstanty

    Konstanty - 2009-04-21
    • assigned_to: nobody --> metaplasma
    • status: open --> pending-fixed
     
  • Konstanty

    Konstanty - 2009-04-21

    The patch is applied in CVS.
    What kind of platform has char != int8_t ?

     
  • Stanislav Brabec

    • status: pending-fixed --> open-fixed
     
  • Stanislav Brabec

    Probably none yet, but 36 is probably incorrect value. At least gcc reports on x86_64:

    inlined from 'BOOL PAT_Load_Instruments(void*)' at load_pat.cpp:1321:
    /usr/include/bits/string3.h:122: warning: call to char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int) will
    always overflow destination buffer

     
  • Konstanty

    Konstanty - 2009-04-21

    Yeah, I see it now - there are several reserved - this one is of size 32.
    And 32 is used correctly in the 2 times below this line.
    (So therefore this problem should affect all platforms)

     
  • Konstanty

    Konstanty - 2009-04-27
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.