Menu

#45 Core Dumped

closed
nobody
None
2019-10-30
2019-05-13
Cerv
No

Error in `xfig': free(): invalid pointer: 0x00005579c3ad7c40
Aborted (core dumped)
w_dir.c Line 620 free(cmask);

Clicking File -> Export generates the CoreDump.

Caused by:
w_dir.c Line 564 strcpy(cmask,"*");

Strdup of an empty string mask="" in line 562 mallocs a string cmask of length 1.
In line 564 a strcpy(cmask,"*") copies two characters.
Therefore, the free(cmask) is invalid.

Eventually line 564 should do a realloc or line 562 a malloc() and strcpy().

Best regards,
cerv

Discussion

  • tkl

    tkl - 2019-05-13

    Thank you for reporting the issue, and providing a solution. The issue will be fixed with the next release. In fact, it has already been fixed in the development version, which, however, is not yet publicly available.

    Yours,

    Thomas

     
  • tkl

    tkl - 2019-10-30
    • status: open --> closed
     
  • tkl

    tkl - 2019-10-30

    Fixed with release 3.2.7b.

     

Log in to post a comment.