From 7211c51139a7477c0ca65eab29c637a7de22da12 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sun, 21 Sep 2003 06:36:50 -0700 Subject: [PATCH] [svn] path_simplify would read two bytes past the end of the string in the "./" case. --- src/ChangeLog | 5 +++++ src/url.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1a0c9883..81797720 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-21 Bertrand Demiddelaer + + * url.c (path_simplify): Would read two bytes past the end of the + string in the "./" case. + 2003-09-21 Matthew J. Mellon * http.c (gethttp): Recognize content-type "application/xhtml+xml" diff --git a/src/url.c b/src/url.c index 0cead0fa..d4803191 100644 --- 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; }