File: format-security.patch

package info (click to toggle)
ruby-rmagick 2.13.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,620 kB
  • ctags: 1,785
  • sloc: ansic: 16,759; ruby: 9,717; makefile: 14; sh: 14
file content (24 lines) | stat: -rw-r--r-- 848 bytes parent folder | 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
Description: fix format security warnings
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2014-01-15

--- a/ext/RMagick/rmutil.c
+++ b/ext/RMagick/rmutil.c
@@ -1609,7 +1609,7 @@
 void
 rm_fatal_error_handler(const ExceptionType severity, const char *reason, const char *description)
 {
-    rb_raise(Class_FatalImageMagickError, GetLocaleExceptionMessage(severity, reason));
+    rb_raise(Class_FatalImageMagickError, "%s", GetLocaleExceptionMessage(severity, reason));
     description = description;
 }
 
@@ -1649,7 +1649,7 @@
             exception->description ? ": " : "",
             exception->description ? GetLocaleExceptionMessage(exception->severity, exception->description) : "");
         msg[sizeof(msg)-1] = '\0';
-        rb_warning(msg);
+        rb_warning("%s", msg);
 
         // Caller deletes ExceptionInfo...