iraf-community / iraf-fitsutil

FITS utilities
https://iraf.readthedocs.io/en/latest/tasks/fitsutil
Other
2 stars 1 forks source link

fgwrite: Fix definition of card size #1

Closed olebole closed 6 years ago

olebole commented 6 years ago

The card string is used in a getcwd(card, SZ_PATHNAME) call. The man page of getcwd (3) says:

char *getcwd(char *buf, size_t size); [...] The size argument is the size in bytes of the character array pointed to by the buf argument.

SZ_PATHNAME is set to 511; however card had only 256 chars. With hardening enabled, this results in a segmentation fault on Debian.

This patch just increases the size of card to the necessary value.