[packages/cinelerra-cv] - fix building with -Wformat-security
baggins
baggins at pld-linux.org
Thu Nov 8 17:27:49 CET 2012
commit 45876cb3205a36728eb681a320a71a136b54ca35
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Nov 8 17:27:33 2012 +0100
- fix building with -Wformat-security
cinelerra-cv-format-security.patch | 69 ++++++++++++++++++++++++++++++++++++++
cinelerra-cv.spec | 4 ++-
2 files changed, 72 insertions(+), 1 deletion(-)
---
diff --git a/cinelerra-cv.spec b/cinelerra-cv.spec
index f09fb9b..7f39d7d 100644
--- a/cinelerra-cv.spec
+++ b/cinelerra-cv.spec
@@ -2,7 +2,7 @@
# - external libraries packages (is there any sense in that?)
#
%define snap 20121104
-%define rel 1
+%define rel 2
Summary: Cinelerra - capturing, editing and production of audio/video material
Summary(pl.UTF-8): Cinelerra - nagrywanie, obróbka i produkcja materiału audio/video
Name: cinelerra-cv
@@ -18,6 +18,7 @@ Patch1: %{name}-desktop.patch
# http://bugs.cinelerra.org/raw-attachment/ticket/949/remove-support-v4l-buzz-k2-6-38.diff
Patch2: remove-support-v4l-buzz-k2-6-38.diff
Patch3: %{name}-ffmpeg.patch
+Patch4: %{name}-format-security.patch
URL: http://cinelerra.org/
BuildRequires: OpenEXR-devel >= 1.2.1
BuildRequires: OpenGL-GLU-devel
@@ -103,6 +104,7 @@ Wersja społecznościowa.
%patch1 -p1
#%patch2 -p1
%patch3 -p1
+%patch4 -p1
find -name Makefile.am | xargs %{__sed} -i -e 's#^LIBTOOL =.*##g'
diff --git a/cinelerra-cv-format-security.patch b/cinelerra-cv-format-security.patch
new file mode 100644
index 0000000..719ab54
--- /dev/null
+++ b/cinelerra-cv-format-security.patch
@@ -0,0 +1,69 @@
+diff -ur -x .deps cinelerra-cv.orig/cinelerra/formattools.C cinelerra-cv/cinelerra/formattools.C
+--- cinelerra-cv.orig/cinelerra/formattools.C 2010-03-27 10:32:14.000000000 +0100
++++ cinelerra-cv/cinelerra/formattools.C 2012-11-08 17:23:30.215081904 +0100
+@@ -322,7 +322,7 @@
+ *ptr = '.';
+ }
+ ptr++;
+- sprintf(ptr, extension);
++ sprintf(ptr, "%s", extension);
+
+ int character1 = ptr - asset->path;
+ int character2 = ptr - asset->path + strlen(extension);
+diff -ur -x .deps cinelerra-cv.orig/cinelerra/record.C cinelerra-cv/cinelerra/record.C
+--- cinelerra-cv.orig/cinelerra/record.C 2010-03-27 10:32:15.000000000 +0100
++++ cinelerra-cv/cinelerra/record.C 2012-11-08 17:24:11.041747132 +0100
+@@ -355,7 +355,7 @@
+ if(batch->channel < 0 || batch->channel >= channeldb->size())
+ sprintf(string, _("None"));
+ else
+- sprintf(string, channeldb->get(batch->channel)->title);
++ sprintf(string, "%s", channeldb->get(batch->channel)->title);
+ break;
+ }
+ }
+diff -ur -x .deps cinelerra-cv.orig/guicast/stringfile.C cinelerra-cv/guicast/stringfile.C
+--- cinelerra-cv.orig/guicast/stringfile.C 2010-03-27 10:32:17.000000000 +0100
++++ cinelerra-cv/guicast/stringfile.C 2012-11-08 17:22:50.291749980 +0100
+@@ -230,7 +230,7 @@
+ }
+
+ for(i = 0; i < indent; i++, pointer++) string[pointer] = ' ';
+- sprintf(&string[pointer], arg1);
++ sprintf(&string[pointer], "%s", arg1);
+ pointer += strlen(arg1);
+ return 0;
+ }
+diff -ur -x .deps cinelerra-cv.orig/libmpeg3/mpeg3tocutil.c cinelerra-cv/libmpeg3/mpeg3tocutil.c
+--- cinelerra-cv.orig/libmpeg3/mpeg3tocutil.c 2010-03-27 10:32:17.000000000 +0100
++++ cinelerra-cv/libmpeg3/mpeg3tocutil.c 2012-11-08 17:20:11.405088917 +0100
+@@ -1205,7 +1205,7 @@
+
+ // Store file information
+ PUT_INT32(FILE_INFO);
+- fprintf(file->toc_fd, file->fs->path);
++ fprintf(file->toc_fd, "%s", file->fs->path);
+ for(j = strlen(file->fs->path); j < MPEG3_STRLEN; j++)
+ fputc(0, file->toc_fd);
+ PUT_INT64(file->source_date);
+@@ -1236,7 +1236,7 @@
+ // Path
+ PUT_INT32(TITLE_PATH);
+
+- fprintf(file->toc_fd, title->fs->path);
++ fprintf(file->toc_fd, "%s", title->fs->path);
+
+ // Pad path with 0
+ for(j = strlen(title->fs->path); j < MPEG3_STRLEN; j++)
+diff -ur -x .deps cinelerra-cv.orig/mpeg2enc/mpeg2enc.c cinelerra-cv/mpeg2enc/mpeg2enc.c
+--- cinelerra-cv.orig/mpeg2enc/mpeg2enc.c 2010-03-27 10:32:17.000000000 +0100
++++ cinelerra-cv/mpeg2enc/mpeg2enc.c 2012-11-08 17:21:19.281753192 +0100
+@@ -340,7 +340,7 @@
+ void error(text)
+ char *text;
+ {
+- fprintf(stderr,text);
++ fprintf(stderr,"%s",text);
+ putc('\n',stderr);
+ exit(1);
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cinelerra-cv.git/commitdiff/45876cb3205a36728eb681a320a71a136b54ca35
More information about the pld-cvs-commit
mailing list