pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/imlib io-ppm uses '%i' with sscanf in order t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/de89d5b13e02
branches: trunk
changeset: 470950:de89d5b13e02
user: cube <cube%pkgsrc.org@localhost>
date: Sat Mar 13 17:35:54 2004 +0000
description:
io-ppm uses '%i' with sscanf in order to parse what should always be a
decimal number, according to the specification. As a result, it fails to
correctly parse file created with numbers printed with leading 0.
Reported and fix provided in PR 24759 by Enami Tsugutomo.
diffstat:
graphics/imlib/distinfo | 3 ++-
graphics/imlib/patches/patch-ai | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r 684df6c12ecc -r de89d5b13e02 graphics/imlib/distinfo
--- a/graphics/imlib/distinfo Sat Mar 13 17:24:31 2004 +0000
+++ b/graphics/imlib/distinfo Sat Mar 13 17:35:54 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2002/11/26 12:32:20 jmmv Exp $
+$NetBSD: distinfo,v 1.14 2004/03/13 17:35:54 cube Exp $
SHA1 (imlib-1.9.14.tar.gz) = 3c8c8c3aaec3cc5a9fc924060a71223862a313f6
Size (imlib-1.9.14.tar.gz) = 748591 bytes
@@ -7,3 +7,4 @@
SHA1 (patch-ae) = 3ed6fff2e73f04ec83c27dc6e3f2db2fa446abbb
SHA1 (patch-ag) = 0ed464cb26492f3eebb8812efdb49ee83ef4ae6b
SHA1 (patch-ah) = 703f83ad25e0a8af8427ccd4d8492f7fa83f26a3
+SHA1 (patch-ai) = 4c1ab5bd72cd3a5070a84b08e7870591d5a3b309
diff -r 684df6c12ecc -r de89d5b13e02 graphics/imlib/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/imlib/patches/patch-ai Sat Mar 13 17:35:54 2004 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.1 2004/03/13 17:35:54 cube Exp $
+
+--- gdk_imlib/io-ppm.c.orig 2002-03-04 18:06:29.000000000 +0100
++++ gdk_imlib/io-ppm.c
+@@ -50,7 +50,7 @@ loader_ppm (FILE * f, int *w, int *h, in
+ if (s[0] != '#')
+ {
+ done = 0;
+- sscanf(s, "%i %i", w, h);
++ sscanf(s, "%d %d", w, h);
+ a = *w;
+ b = *h;
+ if (a > 32767)
+@@ -66,7 +66,7 @@ loader_ppm (FILE * f, int *w, int *h, in
+ if (!bw)
+ {
+ fgets(s, 256, f);
+- sscanf(s, "%i", &scale);
++ sscanf(s, "%d", &scale);
+ }
+ else
+ scale = 99999;
Home |
Main Index |
Thread Index |
Old Index