]> sjero.net Git - wget/commitdiff
[svn] path_simplify would read two bytes past the end of the string in the "./" case.
authorhniksic <devnull@localhost>
Sun, 21 Sep 2003 13:36:50 +0000 (06:36 -0700)
committerhniksic <devnull@localhost>
Sun, 21 Sep 2003 13:36:50 +0000 (06:36 -0700)
src/ChangeLog
src/url.c

index 1a0c9883c6b3da871d5b8c2fd63f2d99d98be736..81797720da2a1ebdc7bf1badb0abf05bb0355aeb 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-21  Bertrand Demiddelaer  <bert@b3rt.org>
+
+       * url.c (path_simplify): Would read two bytes past the end of the
+       string in the "./" case.
+
 2003-09-21  Matthew J. Mellon  <mellon@tymenet.com>
 
        * http.c (gethttp): Recognize content-type "application/xhtml+xml"
index 0cead0faa724e01bf418ff625c248d5db495c1a8..d48031916aa747391e4a3ddffc744d728290fe50 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -1776,7 +1776,7 @@ path_simplify (char *path)
          if (*(p + 1) == '/')
            {
              change = 1;
-             memmove (p, p + 2, end - p);
+             memmove (p, p + 2, end - (p + 2));
              end -= 2;
              goto again;
            }