Package: iec16022 Version: 0.2.4-1 Severity: important Tags: upstream patch
Dear Maintainer, iec16022 produces broken datamatrix images when the data to encodes causes it to enable EDIFACT encoding, which is broken. Steps to reproduce: iec16022 --format=png -o out.png "AA/A000AAA5A/1;00000000-00-00-000;" -> Creates broken data in "out.png" Verify with: pngtopnm out.png | pnmscale 4.0 | pnmtopng >/tmp/b.png ; dmtxread /tmp/b.png -- System Information: Debian Release: 7.7 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/6 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages iec16022 depends on: ii libc6 2.13-38+deb7u6 ii libiec16022-0 0.2.4-1 ii libpopt0 1.16-7 ii zlib1g 1:1.2.7.dfsg-13 iec16022 recommends no packages. iec16022 suggests no packages. -- no debconf information
diff -c -r y/iec16022-0.2.4/iec16022ecc200.c fixedifact/iec16022-0.2.4/iec16022ecc200.c *** y/iec16022-0.2.4/iec16022ecc200.c 2008-11-30 01:22:32.000000000 +0100 --- fixedifact/iec16022-0.2.4/iec16022ecc200.c 2014-12-22 15:09:05.000000000 +0100 *************** *** 357,364 **** { unsigned char out[4], p = 0; if (enc != newenc) { // can only be from C40/Text/X12 ! t[tp++] = 254; ! enc = 'a'; } while (sp < sl && tolower(encoding[sp]) == 'e' && p < 4) --- 357,364 ---- { unsigned char out[4], p = 0; if (enc != newenc) { // can only be from C40/Text/X12 ! t[tp++] = 240; ! enc = 'e'; } while (sp < sl && tolower(encoding[sp]) == 'e' && p < 4) *************** *** 367,381 **** out[p++] = 0x1F; enc = 'a'; } // termination ! t[tp] = ((s[0] & 0x3F) << 2); ! t[tp++] |= ((s[1] & 0x30) >> 4); ! t[tp] = ((s[1] & 0x0F) << 4); if (p == 2) tp++; else { ! t[tp++] |= ((s[2] & 0x3C) >> 2); ! t[tp] = ((s[2] & 0x03) << 6); ! t[tp++] |= (s[3] & 0x3F); } } break; --- 367,381 ---- out[p++] = 0x1F; enc = 'a'; } // termination ! t[tp] = ((out[0] & 0x3F) << 2); ! t[tp++] |= ((out[1] & 0x30) >> 4); ! t[tp] = ((out[1] & 0x0F) << 4); if (p == 2) tp++; else { ! t[tp++] |= ((out[2] & 0x3C) >> 2); ! t[tp] = ((out[2] & 0x03) << 6); ! t[tp++] |= (out[3] & 0x3F); } } break;