]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ABR read bug. Not allocating a big enough buffer for error
authorwessels <>
Tue, 21 Oct 1997 09:33:41 +0000 (09:33 +0000)
committerwessels <>
Tue, 21 Oct 1997 09:33:41 +0000 (09:33 +0000)
message text strings.

src/errorpage.cc

index 2b37e88e923f3ba6d345f711b0eaaf1b9e8ce80f..8945807beb7f64bea8dc6f45c5c15ae618c6e017 100644 (file)
@@ -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);