From: hniksic Date: Wed, 1 Nov 2000 23:57:19 +0000 (-0800) Subject: [svn] Applied contributed fix. X-Git-Tag: v1.13~2412 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=b3758323ed721fee3f3a3d01f717dce9a395b579 [svn] Applied contributed fix. --- diff --git a/src/ChangeLog b/src/ChangeLog index 18f28cc4..f4f7336f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-11-02 Hrvoje Niksic + + * url.c (parseurl): Remove possible reading past the end of + sup_protos[]. Spotted by Mark A. Mankins . + 2000-11-01 Hrvoje Niksic * main.c (main): In case of opt.downloaded overflowing, print diff --git a/src/url.c b/src/url.c index 5447c104..892e750a 100644 --- a/src/url.c +++ b/src/url.c @@ -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;