From: wessels <> Date: Tue, 21 Oct 1997 09:33:41 +0000 (+0000) Subject: ABR read bug. Not allocating a big enough buffer for error X-Git-Tag: SQUID_3_0_PRE1~4751 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59ea0962feb6fa8d794f9e6744bb39d2220589e1;p=thirdparty%2Fsquid.git ABR read bug. Not allocating a big enough buffer for error message text strings. --- diff --git a/src/errorpage.cc b/src/errorpage.cc index 2b37e88e92..8945807beb 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.79 1997/10/20 22:59:45 wessels Exp $ + * $Id: errorpage.cc,v 1.80 1997/10/21 03:33:41 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -79,7 +79,7 @@ errorInitialize(void) if (fstat(fd, &sb) < 0) fatal_dump("stat() failed on error text file"); safe_free(error_text[i]); - error_text[i] = xcalloc(sb.st_size, 1); + error_text[i] = xcalloc(sb.st_size+1, 1); if (read(fd, error_text[i], sb.st_size) != sb.st_size) fatal_dump("failed to fully read error text file"); file_close(fd);