Closed olebole closed 6 years ago
The card string is used in a getcwd(card, SZ_PATHNAME) call. The man page of getcwd (3) says:
card
getcwd(card, SZ_PATHNAME)
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.
char *getcwd(char *buf, size_t size);
size
buf
SZ_PATHNAME is set to 511; however card had only 256 chars. With hardening enabled, this results in a segmentation fault on Debian.
SZ_PATHNAME
This patch just increases the size of card to the necessary value.
The
card
string is used in agetcwd(card, SZ_PATHNAME)
call. The man page of getcwd (3) says:SZ_PATHNAME
is set to 511; howevercard
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.