You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This mess goes completely to hell when a reallocation is necessary. Not only is realloc() called with the wrong arguments; sptable was also incremented before (so that it does not point anymore to the allocated memory). And after a realloc, the free(ip) will free the wrong memory.
Welcome to IRAF.
The text was updated successfully, but these errors were encountered:
The file
fgwrite.c
is obviously buggy in the memory allocation ofslines
.slines
is globally defined:https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L112
main(argc, argv)
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L269-L272
…
toc_card()
andlist_mef()
is called indirectlyhttps://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L303-L306
toc_card (in, fh, ftype, hd_cards, level, usize)
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L1463-L1468list_mef(fd, usize)
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L1585-L1589This mess goes completely to hell when a reallocation is necessary. Not only is
realloc()
called with the wrong arguments;sptable
was also incremented before (so that it does not point anymore to the allocated memory). And after a realloc, thefree(ip)
will free the wrong memory.Welcome to IRAF.
The text was updated successfully, but these errors were encountered: