[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

NMU: #305412: p2c segfaults on specific input



Hi,

in a minute, I will upload the attached changes to p2c. Josip (or the
respective p2c maintainer), please incorporate them into the next
maintainer upload.

Thanks.

bye,
  Roland
-- 
diff -ruN ../p2c-1.21alpha2/debian/changelog p2c-1.21alpha2/debian/changelog
--- ../p2c-1.21alpha2/debian/changelog	2005-05-05 16:11:23.035036055 +0200
+++ p2c-1.21alpha2/debian/changelog	2005-05-05 16:06:55.635108119 +0200
@@ -1,3 +1,11 @@
+p2c (1.21alpha2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload (0-day)
+  * Applied patch by Peter De Wachter that fixes double memory free()'s
+    (Closes: #305412, #307706)
+
+ -- Roland Stigge <stigge@antcom.de>  Thu,  5 May 2005 16:04:37 +0200
+
 p2c (1.21alpha2-2) unstable; urgency=low
 
   * Added debhelper to build-depends, closes: #190499.
diff -ruN ../p2c-1.21alpha2/src/decl.c p2c-1.21alpha2/src/decl.c
--- ../p2c-1.21alpha2/src/decl.c	1993-12-08 06:36:50.000000000 +0100
+++ p2c-1.21alpha2/src/decl.c	2005-05-05 16:04:31.319971801 +0200
@@ -789,8 +789,10 @@
 		mpp2 = &mp2->snext;
 	    if (mp2)
 		*mpp2 = mp2->snext;
+#if 0
 	    if (mp->kind == MK_CONST)
 		free_value(&mp->val);
+#endif
 	    freeexpr(mp->constdefn);
 	    if (mp->cbase)
 		forget_ctx(mp, 1);
diff -ruN ../p2c-1.21alpha2/src/parse.c p2c-1.21alpha2/src/parse.c
--- ../p2c-1.21alpha2/src/parse.c	1993-12-08 06:36:49.000000000 +0100
+++ p2c-1.21alpha2/src/parse.c	2005-05-05 16:04:31.339968355 +0200
@@ -4642,8 +4642,10 @@
 	}
     }
     if (conserve_mem) {
+#if 0
 	free_stmt((Stmt *)func->val.i);   /* is this safe? */
 	func->val.i = 0;
+#endif
 	forget_ctx(func, 0);
     }
     outsection(spacing);

Reply to: