diff options
author | cube <cube@pkgsrc.org> | 2004-03-13 17:35:54 +0000 |
---|---|---|
committer | cube <cube@pkgsrc.org> | 2004-03-13 17:35:54 +0000 |
commit | c890c73a7292892a2dcef2ea0a9e44c766cfc458 (patch) | |
tree | a5577a1ba5b317f4a8281aaa36d683ae283740ce /graphics/imlib | |
parent | 3065fa8725cab3fde73bbb0ac0efb7955f5caacf (diff) | |
download | pkgsrc-c890c73a7292892a2dcef2ea0a9e44c766cfc458.tar.gz |
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 (limited to 'graphics/imlib')
-rw-r--r-- | graphics/imlib/distinfo | 3 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-ai | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/graphics/imlib/distinfo b/graphics/imlib/distinfo index 86c34a94c29..fd0644c0822 100644 --- a/graphics/imlib/distinfo +++ b/graphics/imlib/distinfo @@ -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-ab) = df9f9f7c85f0794748a4ca6f58836f8dd230c805 SHA1 (patch-ae) = 3ed6fff2e73f04ec83c27dc6e3f2db2fa446abbb SHA1 (patch-ag) = 0ed464cb26492f3eebb8812efdb49ee83ef4ae6b SHA1 (patch-ah) = 703f83ad25e0a8af8427ccd4d8492f7fa83f26a3 +SHA1 (patch-ai) = 4c1ab5bd72cd3a5070a84b08e7870591d5a3b309 diff --git a/graphics/imlib/patches/patch-ai b/graphics/imlib/patches/patch-ai new file mode 100644 index 00000000000..d694b7f1b37 --- /dev/null +++ b/graphics/imlib/patches/patch-ai @@ -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; |