1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Applied contributed fix.

This commit is contained in:
hniksic 2000-11-01 15:57:19 -08:00
parent 88df27b3a5
commit b3758323ed
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
* url.c (parseurl): Remove possible reading past the end of
sup_protos[]. Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
* main.c (main): In case of opt.downloaded overflowing, print

View File

@ -405,7 +405,7 @@ parseurl (const char *url, struct urlinfo *u, int strict)
}
/* If protocol is recognizable, but unsupported, bail out, else
suppose unknown. */
if (recognizable && !sup_protos[i].name)
if (recognizable && i == ARRAY_SIZE (sup_protos))
return URLUNKNOWN;
else if (i == ARRAY_SIZE (sup_protos))
type = URLUNKNOWN;