]> git.pld-linux.org Git - packages/cinelerra-cv.git/blob - cinelerra-cv-format-security.patch
- fix building with -Wformat-security
[packages/cinelerra-cv.git] / cinelerra-cv-format-security.patch
1 diff -ur -x .deps cinelerra-cv.orig/cinelerra/formattools.C cinelerra-cv/cinelerra/formattools.C
2 --- cinelerra-cv.orig/cinelerra/formattools.C   2010-03-27 10:32:14.000000000 +0100
3 +++ cinelerra-cv/cinelerra/formattools.C        2012-11-08 17:23:30.215081904 +0100
4 @@ -322,7 +322,7 @@
5                         *ptr = '.';
6                 }
7                 ptr++;
8 -               sprintf(ptr, extension);
9 +               sprintf(ptr, "%s", extension);
10  
11                 int character1 = ptr - asset->path;
12                 int character2 = ptr - asset->path + strlen(extension);
13 diff -ur -x .deps cinelerra-cv.orig/cinelerra/record.C cinelerra-cv/cinelerra/record.C
14 --- cinelerra-cv.orig/cinelerra/record.C        2010-03-27 10:32:15.000000000 +0100
15 +++ cinelerra-cv/cinelerra/record.C     2012-11-08 17:24:11.041747132 +0100
16 @@ -355,7 +355,7 @@
17                         if(batch->channel < 0 || batch->channel >= channeldb->size())
18                                 sprintf(string, _("None"));
19                         else
20 -                               sprintf(string, channeldb->get(batch->channel)->title);
21 +                               sprintf(string, "%s", channeldb->get(batch->channel)->title);
22                         break;
23         }
24  }
25 diff -ur -x .deps cinelerra-cv.orig/guicast/stringfile.C cinelerra-cv/guicast/stringfile.C
26 --- cinelerra-cv.orig/guicast/stringfile.C      2010-03-27 10:32:17.000000000 +0100
27 +++ cinelerra-cv/guicast/stringfile.C   2012-11-08 17:22:50.291749980 +0100
28 @@ -230,7 +230,7 @@
29         }
30         
31         for(i = 0; i < indent; i++, pointer++) string[pointer] = ' ';
32 -       sprintf(&string[pointer], arg1);
33 +       sprintf(&string[pointer], "%s", arg1);
34         pointer += strlen(arg1);
35         return 0;
36  }
37 diff -ur -x .deps cinelerra-cv.orig/libmpeg3/mpeg3tocutil.c cinelerra-cv/libmpeg3/mpeg3tocutil.c
38 --- cinelerra-cv.orig/libmpeg3/mpeg3tocutil.c   2010-03-27 10:32:17.000000000 +0100
39 +++ cinelerra-cv/libmpeg3/mpeg3tocutil.c        2012-11-08 17:20:11.405088917 +0100
40 @@ -1205,7 +1205,7 @@
41  
42  // Store file information
43         PUT_INT32(FILE_INFO);
44 -       fprintf(file->toc_fd, file->fs->path);
45 +       fprintf(file->toc_fd, "%s", file->fs->path);
46         for(j = strlen(file->fs->path); j < MPEG3_STRLEN; j++)
47                         fputc(0, file->toc_fd);
48         PUT_INT64(file->source_date);
49 @@ -1236,7 +1236,7 @@
50  // Path
51                 PUT_INT32(TITLE_PATH);
52  
53 -               fprintf(file->toc_fd, title->fs->path);
54 +               fprintf(file->toc_fd, "%s", title->fs->path);
55  
56  // Pad path with 0
57                 for(j = strlen(title->fs->path); j < MPEG3_STRLEN; j++)
58 diff -ur -x .deps cinelerra-cv.orig/mpeg2enc/mpeg2enc.c cinelerra-cv/mpeg2enc/mpeg2enc.c
59 --- cinelerra-cv.orig/mpeg2enc/mpeg2enc.c       2010-03-27 10:32:17.000000000 +0100
60 +++ cinelerra-cv/mpeg2enc/mpeg2enc.c    2012-11-08 17:21:19.281753192 +0100
61 @@ -340,7 +340,7 @@
62  void error(text)
63  char *text;
64  {
65 -  fprintf(stderr,text);
66 +  fprintf(stderr,"%s",text);
67    putc('\n',stderr);
68    exit(1);
69  }
This page took 0.066955 seconds and 4 git commands to generate.