Package: acedb / 4.9.39+dfsg.02-5

fix_hardening_errors.patch Patch series | 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Author: Andreas Tille <tille@debian.org>
Last-Update: Thu, 10 Dec 2015 15:24:16 +0100
Description: Fix code errors preventing compilation with
 hardening switched on

--- a/wace/homonym.c
+++ b/wace/homonym.c
@@ -75,8 +75,7 @@ static void scanInput(void)
           && strcmp("Representative",cp)
 	  )  /* Just copy the whole line to the output */
 	{ freeback() ;
-	  printf(freewordcut("\n",&cutter)) ;
-	  printf("\n") ;
+	  printf("%s\n", freewordcut("\n",&cutter)) ;
 	  continue ;
 	}
           /* Found author, do check */
@@ -97,7 +96,7 @@ static void scanInput(void)
 	  nnew++ ;
 	  fprintf(new,"%s\n",cp) ;
 	found: 
-	  printf(cp) ;
+	  printf("%s", cp) ;
 	}
       printf("\"\n") ;
     }
--- a/w2/graphascii.c
+++ b/w2/graphascii.c
@@ -117,7 +117,7 @@ static void asciiDump(void)
 	
 	for (;oldy<y; oldy++)
 	  fputc('\n', fil) ;
-	fprintf(fil, space + 300 - i) ;
+	fprintf(fil, "%s",space + 300 - i) ;
 	fprintf(fil, "%s",cp) ; /* avoid bug if cp contains a % , mhmp 02.04.98 */
 	oldx = x + strlen(cp) ;
       }      
--- a/wgnbk/gnbk.c
+++ b/wgnbk/gnbk.c
@@ -362,8 +362,7 @@ static void interactiveQuestions (void)
 	    {
 	      idxp =  arrayp (idx, key, IDX) ;  
 	      hp = genBankExport ( idxp->master, idxp->n1, idxp->n2) ;
-	      printf(stackText (hp,0)) ; 
-	      printf("\n") ; 
+	      printf("%s\n",stackText (hp,0)) ; 
 	      stackDestroy (hp) ;
 	    } 
 	  else
--- a/wgnbk/gnbkclient.c
+++ b/wgnbk/gnbkclient.c
@@ -76,7 +76,7 @@ void doQuery(char* query)
   if (retval > 0) 
     printf ("Server error code %d",retval);
   else
-    printf (answer) ;
+    printf ("%s",answer) ;
   messfree(answer);
 }