#7 DL_DELETE segfault with illegal data

open-fixed
nobody
None
5
2011-02-13
2011-02-09
devurandom
No

When prev is NULL, DL_DELETE will segfault on the item. This may happen when an item is to be deleted while DL_APPEND was not yet called on it.

Discussion

  • devurandom
    devurandom
    2011-02-09

    Testcase

     
    Attachments
  • Troy Hanson
    Troy Hanson
    2011-02-13

    This is the case where a list element was created without using the DL_ macros but its deletion was attempted using DL_DELETE. Technically its a usage violation. In utlist DL lists have special rules that the macros maintain. Added an assertion to make this fail more 'deterministically' than by segfault. Not sure if this will go into the final release depending on whether Windows supports the assert.h header.

    Side note: I rarely use SourceForge so please address bugs directly to me for best response (thanson@users.sourceforge.net).

     
  • Troy Hanson
    Troy Hanson
    2011-02-13

    • status: open --> open-fixed