File: 004_format_security.patch

package info (click to toggle)
openscap 0.8.0-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 38,092 kB
  • sloc: xml: 140,796; ansic: 75,509; sh: 17,874; makefile: 1,679; python: 536; perl: 442; cpp: 117
file content (26 lines) | stat: -rw-r--r-- 1,158 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: openscap/src/OVAL/probes/unix/shadow.c
===================================================================
--- openscap.orig/src/OVAL/probes/unix/shadow.c	2011-10-11 23:03:09.087085032 +0200
+++ openscap/src/OVAL/probes/unix/shadow.c	2011-10-11 23:03:36.000000000 +0200
@@ -126,7 +126,7 @@
 		if (*pwd != '$')
 			goto fail;
 
-		return SEXP_string_newf(mth_str);
+		return SEXP_string_newf("%s", mth_str);
 	default:
 		return SEXP_string_newf("DES");
 	}
Index: openscap/src/OVAL/probes/unix/linux/iflisteners.c
===================================================================
--- openscap.orig/src/OVAL/probes/unix/linux/iflisteners.c	2011-10-11 22:54:05.483096914 +0200
+++ openscap/src/OVAL/probes/unix/linux/iflisteners.c	2011-10-11 23:06:54.539080104 +0200
@@ -340,7 +340,7 @@
 		fclose(fd);
 
 		if (ent_ifindex == ifindex) {
-			snprintf(interface->interface_name, sizeof interface->interface_name, d_ent->d_name);
+			snprintf(interface->interface_name, sizeof interface->interface_name, "%s", d_ent->d_name);
 			snprintf(buf, sizeof buf - 1, "/sys/class/net/%s/address", d_ent->d_name);
 			fd = fopen(buf, "rt");
 			if (fd == NULL) {