[project @ 2004-05-07 19:04:59 by bursa]

Fix possible buffer under-read.

svn path=/import/netsurf/; revision=840
This commit is contained in:
James Bursa 2004-05-07 19:04:59 +00:00
parent 2d8ba47e70
commit 9d9f208d7e

View File

@ -309,7 +309,8 @@ char *url_join(const char *rel, const char *base)
}
path_len = i;
/* d) */
if (buf[path_len - 2] == '/' && buf[path_len - 1] == '.')
if (2 <= path_len && buf[path_len - 2] == '/' &&
buf[path_len - 1] == '.')
path_len--;
/* e) and f) */
while (1) {