Bug#511971: Should check return code from system() calls

2009-02-18 Thread Michael Stapelberg
Hi James,

* [16.01.09 00:21]:
 Your package hit this check as it doesn't check the return code of
 system(). Attached is a patch to correct this.
 Please consider applying it.
Sorry for taking so long to get back to you. I've merged your patch and
released wiipdf 1.2. Thanks for your patch. New version of the debian package
is on its way.

Best regards,
Michael



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#511971: Should check return code from system() calls

2009-01-15 Thread James Westby
Package: wiipdf
Version: 1.1-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jaunty ubuntu-patch

Hi,

In Ubuntu the buildds build everything with -D_FORTIFY_SOURCE=2
by default, which among other things turns on warnings when return
codes of functions with the __warn_unused attribute set are not
checked.

Your package hit this check as it doesn't check the return code of
system(). Attached is a patch to correct this.

Please consider applying it.

Thanks,

James
diff -u wiipdf-1.1/debian/changelog wiipdf-1.1/debian/changelog
only in patch2:
unchanged:
--- wiipdf-1.1.orig/wiipdf.c
+++ wiipdf-1.1/wiipdf.c
@@ -51,7 +51,10 @@
 		fprintf(stderr, Error allocating memory\n);
 		exit(1);
 	}
-	system(buffer);
+	if (!system(buffer)) {
+		fprintf(stderr, Error executing xpdf\n);
+		exit(1);
+	}
 }
 
 static void quit_xpdf() {
@@ -60,7 +63,10 @@
 		fprintf(stderr, Error allocating memory\n);
 		exit(1);
 	}
-	system(buffer);
+	if (!system(buffer)) {
+		fprintf(stderr, Error executing xpdf\n);
+		exit(1);
+	}
 }
 
 /*