]> git.pld-linux.org Git - packages/grace.git/blob - source-hardening.diff
- added ac+tirpc patch (autoconf fix + tirpc support)
[packages/grace.git] / source-hardening.diff
1 Description: Permit compilation with hardening flags in dpkg >= 1.16.0
2 Origin: vendor
3 Author: Nicholas Breen
4 Index: grace-5.1.22/src/utils.c
5 ===================================================================
6 --- grace-5.1.22.orig/src/utils.c       2012-05-17 19:00:52.144748609 -0700
7 +++ grace-5.1.22/src/utils.c    2012-05-17 19:00:54.000000000 -0700
8 @@ -1171,12 +1171,12 @@
9      if (inwin) {
10          stufftextwin(s);
11      } else {
12 -        printf(s);
13 +        printf("%s", s);
14      }
15  #endif
16      /* log results to file */
17      if (resfp != NULL) {
18 -       fprintf(resfp, s);
19 +       fprintf(resfp, "%s", s);
20      }
21  }
22  
23 @@ -1222,7 +1222,9 @@
24      char buf[GR_MAXPATHLEN];
25      
26      if (wd == NULL) {
27 -        getcwd(workingdir, GR_MAXPATHLEN - 1);
28 +        if (getcwd(workingdir, GR_MAXPATHLEN - 1) == NULL) {
29 +           return RETURN_FAILURE;
30 +        }
31          if (workingdir[strlen(workingdir)-1] != '/') {
32              strcat(workingdir, "/");
33          }
34 Index: grace-5.1.22/src/svgdrv.c
35 ===================================================================
36 --- grace-5.1.22.orig/src/svgdrv.c      2012-05-17 19:00:52.144748609 -0700
37 +++ grace-5.1.22/src/svgdrv.c   2012-05-17 19:00:54.000000000 -0700
38 @@ -745,7 +745,7 @@
39              -tm->cxy, -tm->cyy,
40              scaleval(vp.x), scaleval(vp.y));
41  
42 -    fprintf(prstream, escape_specials((unsigned char *) s, len));
43 +    fprintf(prstream, "%s", escape_specials((unsigned char *) s, len));
44  
45      fprintf(prstream, "</text>\n");
46  }
47 Index: grace-5.1.22/auxiliary/Makefile
48 ===================================================================
49 --- grace-5.1.22.orig/auxiliary/Makefile        2012-05-17 19:00:52.144748609 -0700
50 +++ grace-5.1.22/auxiliary/Makefile     2012-05-17 19:08:21.791557072 -0700
51 @@ -22,7 +22,7 @@
52  devclean : distclean
53  
54  convcal$(EXE) : convcal.c
55 -       $(CC) $(CFLAGS0) $(CPPFLAGS) -o $@ convcal.c $(NOGUI_LIBS)
56 +       $(CC) $(CFLAGS0) $(CPPFLAGS) -Wl,-z,relro -Wl,-z,now -o $@ convcal.c $(NOGUI_LIBS)
57  
58  install : $(AUXILIARIES) $(PROGRAMS) $(SCRIPTS)
59         $(MKINSTALLDIRS) $(DESTDIR)$(GRACE_HOME)/auxiliary
This page took 0.069438 seconds and 3 git commands to generate.