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...
|