Tweak to rev 1.8 to match the offical http://www.gzip.org/gzip-1.2.4b.patch

This commit is contained in:
obrien 2004-05-03 10:29:23 +00:00
parent ac0805e9e0
commit dcedc29dc5

View File

@ -1011,14 +1011,15 @@ local int get_istat(iname, sbuf)
#ifdef NO_MULTIPLE_DOTS
char *dot; /* pointer to ifname extension, or NULL */
#endif
int max_suffix_len = (z_len > 3 ? z_len : 3);
if (strlen(iname) >= sizeof(ifname) - 3) {
/* Leave enough room in ifname or ofname for suffix: */
if (strlen(iname) >= sizeof(ifname) - max_suffix_len) {
errno = ENAMETOOLONG;
perror(iname);
exit_code = ERROR;
return ERROR;
}
strcpy(ifname, iname);
/* If input file exists, return OK. */