On Mon, 14 Nov 2011 20:49:02 +0300
"Kirill Bychkov" <[email protected]> wrote:
> Hi!
>
> Zint is a C library for encoding data in several barcode variants. The
> bundled command-line utility provides a simple interface to the library.
> Features of the library:
> - Over 50 symbologies including all ISO/IEC standards, like QR codes.
> - Unicode translation for symbologies which support Latin-1 and
> Kanji character sets.
> - Full GS1 support including data verification and automated insertion
> of FNC1 characters.
> - Support for encoding binary data including NULL (ASCII 0) characters.
> - Health Industry Barcode (HIBC) encoding capabilities.
> - Output in PNG, EPS and SVG formats with user adjustable sizes and
> colors.
> - Verification stage for SBN, ISBN and ISBN-13 data.
>
> There is also Qt-GUI for zint.
>
> Port is splited into CLI and GUI subpackages.
> Works fine on amd64, i386 and macppc. OK to import?
Hello,
I quickly tested on amd64 and I have several coredump doing regress tests.
Could you test on your i386 and macppc if it's the same for you?
Please replace NO_REGRESS=yes by:
do-regress:
cd ${WRKSRC}/frontend/ && LD_LIBRARY_PATH=${WRKSRC}/backend/ ./test.sh
I wrote a patch (attached), it seems to correctly works but I don't have time
to test if it's totally correct.
Could you see with upstream to report problems?
Thanks,
Remi.
$OpenBSD$
--- backend/common.c.orig Mon May 16 21:12:46 2011
+++ backend/common.c Mon Nov 14 20:01:43 2011
@@ -127,6 +127,13 @@ void lookup(char set_string[], char *table[], char dat
int module_is_set(struct zint_symbol *symbol, int y_coord, int x_coord)
{
+ /* be sure you have y_coord <= ZINT_ROWS_MAX or (x_coord/7) <=
ZINT_COLS_MAX
+ without this you will have coredump, be sure module_is_set(symbol,
this_row, i + block_width) != module_is_set(symbol, this_row, i) */
+ if(y_coord > ZINT_ROWS_MAX)
+ return y_coord;
+ if((x_coord/7) > ZINT_COLS_MAX)
+ return x_coord;
+
return (symbol->encoded_data[y_coord][x_coord / 7] >> (x_coord % 7)) &
1;
#if 0
switch(x_sub) {