All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch for reiser4progs 1.0.7 to build with -Werror=format-security
@ 2009-02-15 18:24 Frederik Himpe
  0 siblings, 0 replies; only message in thread
From: Frederik Himpe @ 2009-02-15 18:24 UTC (permalink / raw)
  To: reiserfs-devel

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

The attached patch fixes building reiser4progs 1.0.7 with the
-Werror=format-security CFLAG, which is used by default now in Mandriva.
Could you review it and include it if it's correct?

Thanks,
-- 
Frederik Himpe <fhimpe@telenet.be>

[-- Attachment #2: reiser4progs-1.0.7-fix-string-format.patch --]
[-- Type: text/x-patch, Size: 4155 bytes --]

diff -ur reiser4progs-1.0.7.orig/libmisc/ui.c reiser4progs-1.0.7/libmisc/ui.c
--- reiser4progs-1.0.7.orig/libmisc/ui.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/libmisc/ui.c	2009-02-15 17:31:09.000000000 +0100
@@ -116,7 +116,7 @@
 				line_width = 0;
 			}
 
-			fprintf(stream, word);
+			fprintf(stream, "%s", word);
 
 			line_width += aal_strlen(word);
 
diff -ur reiser4progs-1.0.7.orig/librepair/add_missing.c reiser4progs-1.0.7/librepair/add_missing.c
--- reiser4progs-1.0.7.orig/librepair/add_missing.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/librepair/add_missing.c	2009-02-15 18:20:14.000000000 +0100
@@ -65,7 +65,7 @@
 	time_str = ctime(&am->stat.time);
 	time_str[aal_strlen(time_str) - 1] = '\0';
 	aal_stream_format(&stream, time_str);
-	aal_mess(stream.entity);
+	aal_mess("%s", (char *) stream.entity);
 	aal_stream_fini(&stream);
 }
 
diff -ur reiser4progs-1.0.7.orig/librepair/cleanup.c reiser4progs-1.0.7/librepair/cleanup.c
--- reiser4progs-1.0.7.orig/librepair/cleanup.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/librepair/cleanup.c	2009-02-15 18:53:37.000000000 +0100
@@ -26,7 +26,7 @@
 	time_str = ctime(&cleanup->stat.time);
 	time_str[aal_strlen(time_str) - 1] = '\0';
 	aal_stream_format(&stream, time_str);
-	aal_mess(stream.entity);
+	aal_mess("%s", (char *) stream.entity);
 	aal_stream_fini(&stream);
 }
 
diff -ur reiser4progs-1.0.7.orig/librepair/disk_scan.c reiser4progs-1.0.7/librepair/disk_scan.c
--- reiser4progs-1.0.7.orig/librepair/disk_scan.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/librepair/disk_scan.c	2009-02-15 18:14:53.000000000 +0100
@@ -45,7 +45,7 @@
 	time_str = ctime(&ds->stat.time);
 	time_str[aal_strlen(time_str) - 1] = '\0';
 	aal_stream_format(&stream, time_str);
-	aal_mess(stream.entity);
+	aal_mess("%s", (char *) stream.entity);
 	aal_stream_fini(&stream);
 }
 
diff -ur reiser4progs-1.0.7.orig/librepair/filter.c reiser4progs-1.0.7/librepair/filter.c
--- reiser4progs-1.0.7.orig/librepair/filter.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/librepair/filter.c	2009-02-15 17:32:41.000000000 +0100
@@ -591,7 +591,7 @@
 	time_str = ctime(&fd->stat.time);
 	time_str[aal_strlen(time_str) - 1] = '\0';
 	aal_stream_format(&stream, time_str);
-	aal_mess(stream.entity);
+	aal_mess("%s", (char *) stream.entity);
 	aal_stream_fini(&stream);
 }
 
diff -ur reiser4progs-1.0.7.orig/librepair/semantic.c reiser4progs-1.0.7/librepair/semantic.c
--- reiser4progs-1.0.7.orig/librepair/semantic.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/librepair/semantic.c	2009-02-15 18:26:50.000000000 +0100
@@ -791,7 +791,7 @@
 	time_str = ctime(&sem->stat.time);
 	time_str[aal_strlen(time_str) - 1] = '\0';
 	aal_stream_format(&stream, time_str);
-	aal_mess(stream.entity);
+	aal_mess("%s", (char *) stream.entity);
 	aal_stream_fini(&stream);
 }
 
diff -ur reiser4progs-1.0.7.orig/librepair/twig_scan.c reiser4progs-1.0.7/librepair/twig_scan.c
--- reiser4progs-1.0.7.orig/librepair/twig_scan.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/librepair/twig_scan.c	2009-02-15 18:21:39.000000000 +0100
@@ -119,7 +119,7 @@
 	time_str[aal_strlen(time_str) - 1] = '\0';
 	
 	aal_stream_format(&stream, time_str);
-	aal_mess(stream.entity);
+	aal_mess("%s", (char *) stream.entity);
 	aal_stream_fini(&stream);
 }
 
diff -ur reiser4progs-1.0.7.orig/progs/debugfs/browse.c reiser4progs-1.0.7/progs/debugfs/browse.c
--- reiser4progs-1.0.7.orig/progs/debugfs/browse.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/progs/debugfs/browse.c	2009-02-15 19:02:02.000000000 +0100
@@ -27,7 +27,7 @@
 		if (read <= 0)
 			break;
 
-		printf(buff);
+		printf("%s", buff);
 	}
 
 	return 0;
diff -ur reiser4progs-1.0.7.orig/progs/debugfs/print.c reiser4progs-1.0.7/progs/debugfs/print.c
--- reiser4progs-1.0.7.orig/progs/debugfs/print.c	2009-01-08 22:34:27.000000000 +0100
+++ reiser4progs-1.0.7/progs/debugfs/print.c	2009-02-15 18:57:18.000000000 +0100
@@ -24,7 +24,7 @@
 		if ((size = aal_stream_read(stream, buff, size)) <= 0)
 			return size;
 		
-		printf(buff);
+		printf("%s", buff);
 	}
 
 	return 0;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-15 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-15 18:24 Patch for reiser4progs 1.0.7 to build with -Werror=format-security Frederik Himpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.