]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gobject-introspection: Use proper format string for g_error
authorTobias Mueller <tobiasmue@gnome.org>
Mon, 12 Apr 2010 17:26:31 +0000 (18:26 +0100)
committerJürg Billeter <j@bitron.ch>
Thu, 27 May 2010 20:41:36 +0000 (22:41 +0200)
g_error expects a format string as first argument which it is now
given. This fixes a potential format string vulnerability.

Fixes bug 615552.

gobject-introspection/scanner.c

index 43a8303e8707a3ac0040c37f13c8e55caa4d685d..d98af491f9797adc73cae71fbe5225e47c72cea1 100644 (file)
@@ -1582,7 +1582,7 @@ g_igenerator_start_preprocessor (GIGenerator *igenerator,
   tmp = g_file_open_tmp (NULL, &tmpname, &error);
   if (error != NULL)
     {
-      g_error (error->message);
+      g_error ("%s", error->message);
       return NULL;
     }
 
@@ -1617,7 +1617,7 @@ g_igenerator_start_preprocessor (GIGenerator *igenerator,
   f = fdopen (tmp, "r");
   if (!f)
     {
-      g_error (strerror (errno));
+      g_error ("%s", strerror (errno));
       unlink (tmpname);
       g_free (tmpname);
       return NULL;