mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 15:29:45 +03:00
[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:
parent
2d8ba47e70
commit
9d9f208d7e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user