Package: sng
Version: 1.0.2-3
Severity: normal
Tags: patch

When given multiple .sng files on the command line, sng will successfully
compile the first one, but subsequent files produce the error message
"illegal repeated chunk" for the first (IHDR) chunk in the file.  sng is
treating the previous file's IHDR chunk as the previous occurrence of this
chunk.

Fix: reset every chunk's seen-count when processing each file.  Patch
attached.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages sng depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libpng12-0                  1.2.8rel-1   PNG library - runtime
ii  zlib1g                      1:1.2.2-4    compression library - runtime

-- no debconf information

-- 
Aaron Crane
--- sngc.c.orig 2003-11-15 19:40:22.000000000 +0000
+++ sngc.c      2005-10-14 10:54:55.494052742 +0100
@@ -1769,6 +1769,16 @@
 
     write_transform_options = PNG_TRANSFORM_IDENTITY;
 
+    /* initialize per-input-file chunk properties */
+    {
+       chunkprops *pp;
+
+       for (pp = properties;
+                pp < properties + sizeof(properties)/sizeof(chunkprops);
+                pp++)
+           pp->count = 0;
+    }
+
     /* interpret the following chunk specifications */
     prevchunk = NONE;
     while (get_token())

Reply via email to