[packages/libgnomeui] - proper format string error solution for x32

baggins baggins at pld-linux.org
Wed Dec 31 20:59:21 CET 2014


commit ca8b85303021b62066df87b54ca83ceb86af1f1c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Dec 31 19:59:04 2014 +0000

    - proper format string error solution for x32

 format-security.patch | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/format-security.patch b/format-security.patch
index ca48d01..2f40d2a 100644
--- a/format-security.patch
+++ b/format-security.patch
@@ -1,20 +1,26 @@
 --- libgnomeui-2.24.5/libgnomeui/gnome-thumbnail.c~	2010-03-29 10:48:34.000000000 +0000
 +++ libgnomeui-2.24.5/libgnomeui/gnome-thumbnail.c	2014-12-31 18:36:43.725812339 +0000
-@@ -863,7 +863,7 @@
+@@ -863,7 +863,11 @@
      }
    close (tmp_fd);
    
--  g_snprintf (mtime_str, 21, "%ld",  original_mtime);
-+  g_snprintf (mtime_str, 21, "%ld",  (long)original_mtime);
++#ifdef __ILP32__
++  g_snprintf (mtime_str, 21, "%lld",  original_mtime);
++#else
+   g_snprintf (mtime_str, 21, "%ld",  original_mtime);
++#endif
    width = gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Width");
    height = gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Height");
  
-@@ -970,7 +970,7 @@
+@@ -970,7 +970,11 @@
      }
    close (tmp_fd);
    
--  g_snprintf (mtime_str, 21, "%ld",  mtime);
-+  g_snprintf (mtime_str, 21, "%ld",  (long)mtime);
++#ifdef __ILP32__
++  g_snprintf (mtime_str, 21, "%lld",  mtime);
++#else
+   g_snprintf (mtime_str, 21, "%ld",  mtime);
++#endif
    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
    saved_ok  = gdk_pixbuf_save (pixbuf,
  			       tmp_path,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgnomeui.git/commitdiff/ca8b85303021b62066df87b54ca83ceb86af1f1c



More information about the pld-cvs-commit mailing list