Ensure buffer is big enough for the extra character.

svn path=/trunk/netsurf/; revision=7003
This commit is contained in:
Chris Young 2009-03-31 06:39:32 +00:00
parent bab30e4f1d
commit 28cfe681db

View File

@ -1093,7 +1093,7 @@ void browser_window_refresh_url_bar(struct browser_window *bw, const char *url,
len += ((frag) ? strlen(frag) : 0);
url_buf = malloc(len + 2 /* '#' + '\0' */);
url_buf = malloc(len + 3 /* '#' + '\0' */);
if (url_buf) {
if (frag) {
snprintf(url_buf, len + 2, "%s#%s", url, frag);