File: 03-wrong-memory-397155.patch

package info (click to toggle)
sitecopy 1%3A0.16.6-10
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 5,844 kB
  • sloc: ansic: 48,856; sh: 3,983; makefile: 787; yacc: 291; awk: 58; sed: 27
file content (16 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Ludovic Rousseau <rousseau at debian dot org>
Subject: A patch for fixing wrong memory intialization


diff -u sitecopy-0.16.3-orig/src/rcfile.c sitecopy-0.16.3/src/rcfile.c
--- sitecopy-0.16.3-orig/src/rcfile.c	2006-02-04 17:46:36.000000000 +0530
+++ sitecopy-0.16.3/src/rcfile.c	2006-11-08 22:24:51.000000000 +0530
@@ -260,7 +260,7 @@
 		if (this_site != &default_site)
 		    last_site = this_site;
 		/* Allocate new item */
-		this_site = ne_malloc(sizeof(struct site));
+		this_site = ne_calloc(sizeof(struct site));
 		/* Copy over the defaults */
 		memcpy(this_site, &default_site, sizeof(struct site));
 		/* Deep-copy the string lists */