~ubuntu-branches/ubuntu/trusty/qhull/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/0002-format-string-security.patch

  • Committer: Package Import Robot
  • Author(s): Barak A. Pearlmutter
  • Date: 2014-02-13 11:09:12 UTC
  • mfrom: (8.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20140213110912-ifwyxorlsnnl1ebh
Tags: 2012.1-4
Add convenience link to #include <qhull/qhull.h> to simplify transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Peter Green <plugwash@p10link.net>
 
2
Date: Wed, 23 Nov 2011 00:00:00 +0000
 
3
Subject: format string security
 
4
 
 
5
Fix FTBFS when building with hardening flags as used by dpkg 1.16.0.
 
6
Note that this was a *false positive* by the compiler: there was
 
7
in fact no security issue.  However we will work around it anyway.
 
8
 
 
9
Bug-Debian: http://bugs.debian.org/643461
 
10
---
 
11
 src/libqhull/io.c       | 2 +-
 
12
 src/testqset/testqset.c | 2 +-
 
13
 2 files changed, 2 insertions(+), 2 deletions(-)
 
14
 
 
15
diff --git a/src/libqhull/io.c b/src/libqhull/io.c
 
16
index 6601ffd..fb1a7fd 100644
 
17
--- a/src/libqhull/io.c
 
18
+++ b/src/libqhull/io.c
 
19
@@ -2238,7 +2238,7 @@ void qh_printfacet3math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst)
 
20
     qh_memfree(point, qh normal_size);
 
21
   qh_settempfree(&points);
 
22
   qh_settempfree(&vertices);
 
23
-  qh_fprintf(fp, 9110, endfmt);
 
24
+  qh_fprintf(fp, 9110, "%s", endfmt);
 
25
 } /* printfacet3math */
 
26
 
 
27
 
 
28
diff --git a/src/testqset/testqset.c b/src/testqset/testqset.c
 
29
index 2bdcf17..309d3bf 100644
 
30
--- a/src/testqset/testqset.c
 
31
+++ b/src/testqset/testqset.c
 
32
@@ -214,7 +214,7 @@ void readOptions(int argc, char **argv, const char *promptstr, int *numInts, int
 
33
     char *endp;
 
34
 
 
35
     if (argc != 2 && argc != 3) {
 
36
-        printf(promptstr);
 
37
+        printf("%s", promptstr);
 
38
         exit(0);
 
39
     }
 
40
     numIntsArg= strtol(argv[1], &endp, 10);