]> sjero.net Git - wget/commitdiff
[svn] Applied contributed fix.
authorhniksic <devnull@localhost>
Wed, 1 Nov 2000 23:57:19 +0000 (15:57 -0800)
committerhniksic <devnull@localhost>
Wed, 1 Nov 2000 23:57:19 +0000 (15:57 -0800)
src/ChangeLog
src/url.c

index 18f28cc4d2ecee3218c5d27d5af67a983e363df3..f4f7336fb8d95ff69f82fa6f103d47c84d2e05cf 100644 (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
index 5447c104b366616deffeb0367b55cefb0f4471a0..892e750ac25aba79f72ca76f30700f462cfcb484 100644 (file)
--- 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;