Skip to content
Snippets Groups Projects
  • Jonathan Schöbel's avatar
    51a3ab66
    fixup! Attr: (internal) added move method · 51a3ab66
    Jonathan Schöbel authored
    This is a severe bug. The purpose of Attr_free is to free the internal
    data, while leaving the outer structure unfreed. What is needed here is
    quite the opposite: freeing the outer structure but leaving the internal
    data intact. Of course the internal data is still needed, as it is data
    that was just assigned to the dest Attr. This bug introduced a double
    free, which is undefined behaviour with all of it's scary effects.
    51a3ab66
    History
    fixup! Attr: (internal) added move method
    Jonathan Schöbel authored
    This is a severe bug. The purpose of Attr_free is to free the internal
    data, while leaving the outer structure unfreed. What is needed here is
    quite the opposite: freeing the outer structure but leaving the internal
    data intact. Of course the internal data is still needed, as it is data
    that was just assigned to the dest Attr. This bug introduced a double
    free, which is undefined behaviour with all of it's scary effects.