File: 02-printf-p

package info (click to toggle)
ltrace 0.7.3-6.4
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 3,964 kB
  • sloc: ansic: 22,858; sh: 10,956; exp: 1,498; makefile: 377; cpp: 196; awk: 88; asm: 40; perl: 24
file content (18 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From: Juan Cespedes <cespedes@debian.org>
Description: Prevent freeing static-alloc'd memory for %p and %n in printf
Bug-Debian: http://bugs.debian.org/614994
Forwarded: http://lists.alioth.debian.org/pipermail/ltrace-devel/2013-September/000953.html
Last-Update: 2014-01-02


--- ltrace-0.7.3.orig/printf.c
+++ ltrace-0.7.3/printf.c
@@ -168,7 +168,7 @@ form_next_param(struct param_enum *self,
 		type_init_pointer(infop, array, 1);
 
 	} else if (format_type == ARGTYPE_POINTER) {
-		type_init_pointer(infop, elt_info, 1);
+		type_init_pointer(infop, elt_info, 0);
 
 	} else {
 		*infop = *type_get_simple(format_type);