From e6155dd37f046e984e1e0d6528a175f649e47161 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Sun, 25 Mar 2012 16:42:45 +0000 Subject: about:imagecache gives URL links, and table is styled. This has revealed a buffer overflow or similar here; reducing the buffer size to 1024 makes it very fragile with long URLs. svn path=/trunk/netsurf/; revision=13700 --- content/fetchers/about.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'content/fetchers') diff --git a/content/fetchers/about.c b/content/fetchers/about.c index a52aa120e..0c93a1dd6 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -181,7 +181,7 @@ static bool fetch_about_licence_handler(struct fetch_about_context *ctx) static bool fetch_about_imagecache_handler(struct fetch_about_context *ctx) { fetch_msg msg; - char buffer[1024]; /* output buffer */ + char buffer[2048]; /* output buffer */ int code = 200; int slen; unsigned int cent_loop = 0; @@ -240,18 +240,19 @@ static bool fetch_about_imagecache_handler(struct fetch_about_context *ctx) /* image cache entry table */ slen = snprintf(buffer, sizeof buffer, - "\n" + "
\n" "" "" "" "" "" "" - "\n"); + "" + "\n"); do { res = image_cache_snentryf(buffer + slen, sizeof buffer - slen, cent_loop, - "\n"); + "\n"); if (res <= 0) break; /* last option */ -- cgit v1.2.3
EntryContent KeyRedraw CountConversion CountLast RedrawBitmap AgeBitmap Size
Bitmap SizeSource URL
%e%k%r%c%a%g%s
%e%k%r%c%a%g%s%U