Add fuzz stuff ("backend/tests/fuzz"), including OSS-Fuzz

"Dockerfile" etc
PDF417: lessen some debug verbosity
gif: use "gif_" prefix; some code fiddling
This commit is contained in:
gitlost 2024-01-04 20:11:04 +00:00
parent 2a55ba0cef
commit 3cb724253b
19 changed files with 1651 additions and 109 deletions

View file

@ -1,4 +1,4 @@
% Tested on Ubuntu 20.04.4 LTS, Ubuntu 22.04 LTS and Fedora Linux 38 (Workstation Edition)
% Tested on Ubuntu 20.04.4 LTS, Ubuntu 22.04 LTS and Fedora Linux 39 (Workstation Edition)
1. Prerequisites for building zint
==================================
@ -112,11 +112,13 @@ A number of options are available:
ZINT_COVERAGE:BOOL=OFF # Set code coverage flags
ZINT_DEBUG:BOOL=OFF # Set debug compile flags
ZINT_FRONTEND:BOOL=ON # Build frontend
ZINT_NOOPT:BOOL=OFF # Set no optimize compile flags
ZINT_SANITIZE:BOOL=OFF # Set sanitize compile/link flags
ZINT_SHARED:BOOL=ON # Build shared library
ZINT_STATIC:BOOL=OFF # Build static library
ZINT_TEST:BOOL=OFF # Set test compile flag
ZINT_UNINSTALL:BOOL=ON # Add uninstall target
ZINT_USE_PNG:BOOL=ON # Build with PNG support
ZINT_USE_QT:BOOL=ON # Build with Qt support
ZINT_QT6:BOOL=OFF # If ZINT_USE_QT, use Qt6

View file

@ -1,7 +1,7 @@
/* composite.c - Handles GS1 Composite Symbols */
/*
libzint - the open source barcode library
Copyright (C) 2008-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2008-2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -326,7 +326,7 @@ static void cc_b(struct zint_symbol *symbol, const char source[], const int cc_w
/* "the CC-B component shall have codeword 920 in the first symbol character position" (section 9a) */
chainemc[mclength++] = 920;
pdf_byteprocess(chainemc, &mclength, data_string, 0, length, 0, debug_print);
pdf_byteprocess(chainemc, &mclength, data_string, 0, length, 0);
/* Now figure out which variant of the symbol to use and load values accordingly */
@ -540,7 +540,7 @@ static void cc_c(struct zint_symbol *symbol, const char source[], const int cc_w
chainemc[mclength++] = 0; /* space for length descriptor */
chainemc[mclength++] = 920; /* CC-C identifier */
pdf_byteprocess(chainemc, &mclength, data_string, 0, length, 0, debug_print);
pdf_byteprocess(chainemc, &mclength, data_string, 0, length, 0);
chainemc[0] = mclength;

View file

@ -1,7 +1,7 @@
/* gif.c - Handles output to gif file */
/*
libzint - the open source barcode library
Copyright (C) 2009-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -36,10 +36,10 @@
#include "filemem.h"
#include "output.h"
/* Limit initial LZW buffer size to this in expectation that compressed data will fit for typical scalings */
/* Set LZW buffer paging size to this in expectation that compressed data will fit for typical scalings */
#define GIF_LZW_PAGE_SIZE 0x100000 /* Megabyte */
typedef struct s_statestruct {
struct gif_state {
struct filemem *fmp;
unsigned char *pOut;
const unsigned char *pIn;
@ -56,9 +56,9 @@ typedef struct s_statestruct {
unsigned short NodeNext[4096];
unsigned char NodePix[4096];
unsigned char map[256];
} statestruct;
};
static void BufferNextByte(statestruct *pState) {
static void gif_BufferNextByte(struct gif_state *pState) {
(pState->OutPosCur)++;
if (pState->fOutPaged && pState->OutPosCur + 2 >= pState->OutLength) {
/* Keep last 256 bytes so `OutByteCountPos` within range */
@ -83,18 +83,18 @@ static void BufferNextByte(statestruct *pState) {
(pState->pOut)[pState->OutPosCur] = 0x00;
}
static void AddCodeToBuffer(statestruct *pState, unsigned short CodeIn, unsigned char CodeBits) {
static void gif_AddCodeToBuffer(struct gif_state *pState, unsigned short CodeIn, unsigned char CodeBits) {
/* Check, if we may fill up the current byte completely */
if (CodeBits >= pState->OutBitsFree) {
(pState->pOut)[pState->OutPosCur] |= (unsigned char) (CodeIn << (8 - pState->OutBitsFree));
BufferNextByte(pState);
gif_BufferNextByte(pState);
CodeIn = (unsigned short) (CodeIn >> pState->OutBitsFree);
CodeBits -= pState->OutBitsFree;
pState->OutBitsFree = 8;
/* Write a full byte if there are at least 8 code bits left */
if (CodeBits >= pState->OutBitsFree) {
(pState->pOut)[pState->OutPosCur] = (unsigned char) CodeIn;
BufferNextByte(pState);
gif_BufferNextByte(pState);
CodeIn = (unsigned short) (CodeIn >> 8);
CodeBits -= 8;
}
@ -106,14 +106,14 @@ static void AddCodeToBuffer(statestruct *pState, unsigned short CodeIn, unsigned
}
}
static void FlushStringTable(statestruct *pState) {
static void gif_FlushStringTable(struct gif_state *pState) {
unsigned short Pos;
for (Pos = 0; Pos < pState->ClearCode; Pos++) {
(pState->NodeAxon)[Pos] = 0;
}
}
static unsigned short FindPixelOutlet(statestruct *pState, unsigned short HeadNode, unsigned char Byte) {
static unsigned short gif_FindPixelOutlet(struct gif_state *pState, unsigned short HeadNode, unsigned char Byte) {
unsigned short Outlet;
Outlet = (pState->NodeAxon)[HeadNode];
@ -125,27 +125,27 @@ static unsigned short FindPixelOutlet(statestruct *pState, unsigned short HeadNo
return 0;
}
static int NextCode(statestruct *pState, unsigned char *pPixelValueCur, unsigned char CodeBits) {
static int gif_NextCode(struct gif_state *pState, unsigned char *pPixelValueCur, unsigned char CodeBits) {
unsigned short UpNode;
unsigned short DownNode;
/* start with the root node for last pixel chain */
UpNode = *pPixelValueCur;
if (pState->pIn == pState->pInEnd) {
AddCodeToBuffer(pState, UpNode, CodeBits);
gif_AddCodeToBuffer(pState, UpNode, CodeBits);
return 0;
}
*pPixelValueCur = pState->map[*pState->pIn++];
/* Follow the string table and the data stream to the end of the longest string that has a code */
while (0 != (DownNode = FindPixelOutlet(pState, UpNode, *pPixelValueCur))) {
while (0 != (DownNode = gif_FindPixelOutlet(pState, UpNode, *pPixelValueCur))) {
UpNode = DownNode;
if (pState->pIn == pState->pInEnd) {
AddCodeToBuffer(pState, UpNode, CodeBits);
gif_AddCodeToBuffer(pState, UpNode, CodeBits);
return 0;
}
*pPixelValueCur = pState->map[*pState->pIn++];
}
/* Submit 'UpNode' which is the code of the longest string */
AddCodeToBuffer(pState, UpNode, CodeBits);
gif_AddCodeToBuffer(pState, UpNode, CodeBits);
/* ... and extend the string by appending 'PixelValueCur' */
/* Create a successor node for 'PixelValueCur' whose code is 'freecode' */
(pState->NodePix)[pState->FreeCode] = *pPixelValueCur;
@ -163,7 +163,7 @@ static int NextCode(statestruct *pState, unsigned char *pPixelValueCur, unsigned
return 1;
}
static int gif_lzw(statestruct *pState, int paletteBitSize) {
static int gif_lzw(struct gif_state *pState, int paletteBitSize) {
unsigned char PixelValueCur;
unsigned char CodeBits;
unsigned short Pos;
@ -190,26 +190,26 @@ static int gif_lzw(statestruct *pState, int paletteBitSize) {
for (Pos = 0; Pos < pState->ClearCode; Pos++)
(pState->NodePix)[Pos] = (unsigned char) Pos;
FlushStringTable(pState);
gif_FlushStringTable(pState);
/* Write what the GIF specification calls the "code size". */
(pState->pOut)[pState->OutPosCur] = paletteBitSize;
/* Reserve first bytecount byte */
BufferNextByte(pState);
gif_BufferNextByte(pState);
pState->OutByteCountPos = pState->OutPosCur;
BufferNextByte(pState);
gif_BufferNextByte(pState);
pState->fByteCountByteSet = 1;
/* Submit one 'ClearCode' as the first code */
AddCodeToBuffer(pState, pState->ClearCode, CodeBits);
gif_AddCodeToBuffer(pState, pState->ClearCode, CodeBits);
for (;;) {
/* generate and save the next code, which may consist of multiple input pixels. */
if (!NextCode(pState, &PixelValueCur, CodeBits)) { /* Check for end of data stream */
if (!gif_NextCode(pState, &PixelValueCur, CodeBits)) { /* Check for end of data stream */
/* submit 'eoi' as the last item of the code stream */
AddCodeToBuffer(pState, (unsigned short) (pState->ClearCode + 1), CodeBits);
gif_AddCodeToBuffer(pState, (unsigned short) (pState->ClearCode + 1), CodeBits);
pState->fByteCountByteSet = 0;
if (pState->OutBitsFree < 8) {
BufferNextByte(pState);
gif_BufferNextByte(pState);
}
/* > Update last bytecount byte; */
if (pState->OutByteCountPos < pState->OutPosCur) {
@ -225,8 +225,8 @@ static int gif_lzw(statestruct *pState, int paletteBitSize) {
pState->FreeCode++;
/* Check for full stringtable - for widest compatibility with gif decoders, empty when 0xfff, not 0x1000 */
if (pState->FreeCode == 0xfff) {
FlushStringTable(pState);
AddCodeToBuffer(pState, pState->ClearCode, CodeBits);
gif_FlushStringTable(pState);
gif_AddCodeToBuffer(pState, pState->ClearCode, CodeBits);
CodeBits = (unsigned char) (1 + paletteBitSize);
pState->FreeCode = (unsigned short) (pState->ClearCode + 2);
@ -240,12 +240,11 @@ static int gif_lzw(statestruct *pState, int paletteBitSize) {
INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf) {
struct filemem fm;
unsigned char outbuf[10];
unsigned short usTemp;
unsigned char paletteRGB[10][3];
int paletteCount, i;
int paletteBitSize;
int paletteSize;
statestruct State;
struct gif_state State;
int transparent_index;
int bgindex = -1, fgindex = -1;
@ -359,20 +358,14 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
paletteSize = 1 << paletteBitSize;
/* GIF signature (6) */
memcpy(outbuf, "GIF87a", 6);
if (transparent_index != -1)
outbuf[4] = '9';
fm_write(outbuf, 1, 6, State.fmp);
fm_write(transparent_index == -1 ? "GIF87a" : "GIF89a", 1, 6, State.fmp);
/* Screen Descriptor (7) */
/* Screen Width */
usTemp = (unsigned short) symbol->bitmap_width;
outbuf[0] = (unsigned char) (0xff & usTemp);
outbuf[1] = (unsigned char) ((0xff00 & usTemp) / 0x100);
outbuf[0] = (unsigned char) (0xff & symbol->bitmap_width);
outbuf[1] = (unsigned char) (0xff & (symbol->bitmap_width >> 8));
/* Screen Height */
usTemp = (unsigned short) symbol->bitmap_height;
outbuf[2] = (unsigned char) (0xff & usTemp);
outbuf[3] = (unsigned char) ((0xff00 & usTemp) / 0x100);
outbuf[2] = (unsigned char) (0xff & symbol->bitmap_height);
outbuf[3] = (unsigned char) (0xff & (symbol->bitmap_height >> 8));
/* write ImageBits-1 to the three least significant bits of byte 5 of
* the Screen Descriptor
* Bits 76543210
@ -436,10 +429,10 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
outbuf[4] = 0x00;
/* Image Width (low byte first) */
outbuf[5] = (unsigned char) (0xff & symbol->bitmap_width);
outbuf[6] = (unsigned char) ((0xff00 & symbol->bitmap_width) / 0x100);
outbuf[6] = (unsigned char) (0xff & (symbol->bitmap_width >> 8));
/* Image Height */
outbuf[7] = (unsigned char) (0xff & symbol->bitmap_height);
outbuf[8] = (unsigned char) ((0xff00 & symbol->bitmap_height) / 0x100);
outbuf[8] = (unsigned char) (0xff & (symbol->bitmap_height >> 8));
/* Byte 10 contains the interlaced flag and
* information on the local color table.

View file

@ -1,7 +1,7 @@
/* pdf417.c - Handles PDF417 stacked symbology */
/*
libzint - the open source barcode library
Copyright (C) 2008-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2008-2024 Robin Stuart <rstuart114@gmail.com>
Portions Copyright (C) 2004 Grandzebu
Bug Fixes thanks to KL Chin <klchin@users.sourceforge.net>
@ -320,15 +320,11 @@ static int pdf_num_stay(const unsigned char *chaine, const int indexliste, short
}
/* Pack segments using the method described in Appendix D of the AIM specification (ISO/IEC 15438:2015 Annex N) */
static void pdf_appendix_d_encode(const unsigned char *chaine, short liste[3][PDF_MAX_LEN], int *p_indexliste,
const int debug_print) {
static void pdf_appendix_d_encode(const unsigned char *chaine, short liste[3][PDF_MAX_LEN], int *p_indexliste) {
const int indexliste = *p_indexliste;
int i = 0, next, last = 0, stayintext = 0;
while (i < indexliste) {
if (debug_print) {
printf("Encoding block %d = %d (%d)\n", i, liste[1][i], liste[0][i]);
}
if ((liste[1][i] == PDF_NUM) && pdf_num_stay(chaine, indexliste, liste, i)) {
/* leave as numeric */
@ -554,30 +550,23 @@ static void pdf_textprocess_minimal(short *chainemc, int *p_mclength, const unsi
/* 671 */
/* Byte compaction */
INTERNAL void pdf_byteprocess(short *chainemc, int *p_mclength, const unsigned char chaine[], int start,
const int length, const int lastmode, const int debug_print) {
const int length, const int lastmode) {
const int real_lastmode = PDF_REAL_MODE(lastmode);
if (debug_print) printf("\nEntering byte mode at position %d\n", start);
if (length == 1) {
/* shift or latch depending on previous mode */
chainemc[(*p_mclength)++] = real_lastmode == PDF_TEX ? 913 : 901;
chainemc[(*p_mclength)++] = chaine[start];
if (debug_print) {
printf("%s %d\n", real_lastmode == PDF_TEX ? "913" : "901", chaine[start]);
}
} else {
int len;
/* select the switch for multiple of 6 bytes */
if (length % 6 == 0) {
chainemc[(*p_mclength)++] = 924;
if (debug_print) fputs("924 ", stdout);
} else {
/* Default mode for MICROPDF417 is Byte Compaction (ISO/IEC 24728:2006 5.4.3), but not emitting it
* depends on whether an ECI has been emitted previously (or not) it appears, so simpler and safer
* to always emit it. */
chainemc[(*p_mclength)++] = 901;
if (debug_print) fputs("901 ", stdout);
}
len = 0;
@ -1025,11 +1014,13 @@ static int pdf_initial(struct zint_symbol *symbol, const unsigned char chaine[],
if (debug_print) {
fputs("\nInitial block pattern:\n", stdout);
for (i = 0; i < indexliste; i++) {
printf("Start: %d Len: %d Type: %s\n", liste[2][i], liste[0][i], pdf_mode_str(liste[1][i]));
int j;
for (j = 0; j < liste[0][i]; j++) fputc(pdf_mode_str(liste[1][i])[0], stdout);
}
fputc('\n', stdout);
}
pdf_appendix_d_encode(chaine, liste, &indexliste, debug_print);
pdf_appendix_d_encode(chaine, liste, &indexliste);
} else {
if (!pdf_define_mode(liste, &indexliste, chaine, length, *p_lastmode, debug_print)) {
strcpy(symbol->errtxt, "749: Insufficient memory for mode buffers");
@ -1040,9 +1031,10 @@ static int pdf_initial(struct zint_symbol *symbol, const unsigned char chaine[],
if (debug_print) {
fputs("\nCompacted block pattern:\n", stdout);
for (i = 0; i < indexliste; i++) {
printf("Start: %d Len: %d Type: %s\n", liste[2][i], liste[0][i],
pdf_mode_str(PDF_REAL_MODE(liste[1][i])));
int j;
for (j = 0; j < liste[0][i]; j++) fputc(pdf_mode_str(PDF_REAL_MODE(liste[1][i]))[0], stdout);
}
fputc('\n', stdout);
}
/* 541 - now compress the data */
@ -1092,7 +1084,7 @@ static int pdf_initial(struct zint_symbol *symbol, const unsigned char chaine[],
}
break;
case PDF_BYT: /* 670 - octet stream mode */
pdf_byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], *p_lastmode, debug_print);
pdf_byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], *p_lastmode);
/* don't switch mode on single byte shift from text mode */
if (PDF_REAL_MODE(*p_lastmode) != PDF_TEX || liste[0][i] != 1) {
*p_lastmode = PDF_BYT;
@ -1457,18 +1449,20 @@ INTERNAL int pdf417(struct zint_symbol *symbol, struct zint_seg segs[], const in
error_number = 0;
if ((symbol->option_1 < -1) || (symbol->option_1 > 8)) {
strcpy(symbol->errtxt, "460: Security value out of range");
if (symbol->warn_level == WARN_FAIL_ALL) {
strcpy(symbol->errtxt, "462: Security value out of range (0 to 8)");
return ZINT_ERROR_INVALID_OPTION;
}
strcpy(symbol->errtxt, "460: Security value out of range (0 to 8), ignored");
symbol->option_1 = -1;
error_number = ZINT_WARN_INVALID_OPTION;
}
if ((symbol->option_2 < 0) || (symbol->option_2 > 30)) {
strcpy(symbol->errtxt, "461: Number of columns out of range (1 to 30)");
if (symbol->warn_level == WARN_FAIL_ALL) {
strcpy(symbol->errtxt, "473: Number of columns out of range (1 to 30)");
return ZINT_ERROR_INVALID_OPTION;
}
strcpy(symbol->errtxt, "461: Number of columns out of range (1 to 30), ignored");
symbol->option_2 = 0;
error_number = ZINT_WARN_INVALID_OPTION;
}

View file

@ -1,7 +1,7 @@
/* pdf417.h - PDF417 tables and coefficients declarations */
/*
libzint - the open source barcode library
Copyright (C) 2008-2022 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2008-2024 Robin Stuart <rstuart114@gmail.com>
Portions Copyright (C) 2004 Grandzebu
Redistribution and use in source and binary forms, with or without
@ -57,7 +57,7 @@ INTERNAL_DATA_EXTERN const unsigned short pdf_rap_side[52];
INTERNAL_DATA_EXTERN const unsigned short pdf_rap_centre[52];
INTERNAL void pdf_byteprocess(short *chainemc, int *p_mclength, const unsigned char chaine[], int start,
const int length, const int lastmode, const int debug);
const int length, const int lastmode);
/* vim: set ts=4 sw=4 et : */
#endif /* Z_PDF417_H */

View file

@ -0,0 +1,21 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make cmake
RUN git clone --depth 1 https://git.code.sf.net/p/zint/code zint
WORKDIR zint
COPY build.sh $SRC/

42
backend/tests/fuzz/build.sh Executable file
View file

@ -0,0 +1,42 @@
#!/bin/bash -eu
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# build project
mkdir build
cd build
cmake -DZINT_STATIC=ON -DZINT_SHARED=OFF \
-DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF -DZINT_FRONTEND=OFF \
-DCMAKE_BUILD_TYPE=Debug \
..
make -j$(nproc)
# build fuzzers
bd=$SRC/zint/backend
fd=$bd/tests/fuzz
fn=fuzz_data
$CC $CFLAGS -fsanitize=fuzzer-no-link -I${bd} $fd/${fn}.c -c -o $WORK/${fn}.o
$CXX $CXXFLAGS $WORK/${fn}.o -o $OUT/${fn} \
$LIB_FUZZING_ENGINE -lm -lzint -Lbackend
cp $fd/${fn}_seed_corpus.zip $OUT
fn=fuzz_gs1
$CC $CFLAGS -fsanitize=fuzzer-no-link -I${bd} $fd/${fn}.c -c -o $WORK/${fn}.o
$CXX $CXXFLAGS $WORK/${fn}.o -o $OUT/${fn} \
$LIB_FUZZING_ENGINE -lm -lzint -Lbackend
cp $fd/${fn}_seed_corpus.zip $OUT
cp $fd/${fn}.dict $OUT

414
backend/tests/fuzz/fuzz.h Normal file
View file

@ -0,0 +1,414 @@
/* fuzz.h - common functions for fuzzing libzint */
/*
libzint - the open source barcode library
Copyright (C) 2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
/* SPDX-License-Identifier: BSD-3-Clause */
#ifndef Z_FUZZ_H
#define Z_FUZZ_H
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "zint.h"
#define ZARRAY_SIZE(x) ((int) (sizeof(x) / sizeof((x)[0])))
#define INPUT_MODE_MASK (ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE | HEIGHTPERROW_MODE | FAST_MODE \
| EXTRA_ESCAPE_MODE)
#ifdef Z_FUZZ_SET_OUTPUT_OPTIONS
#define OUTPUT_OPTIONS_MASK (BARCODE_BIND_TOP | BARCODE_BIND | BARCODE_BOX | BARCODE_STDOUT | READER_INIT \
| SMALL_TEXT | BOLD_TEXT | CMYK_COLOUR | BARCODE_DOTTY_MODE | GS1_GS_SEPARATOR \
| OUT_BUFFER_INTERMEDIATE | BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES \
| COMPLIANT_HEIGHT | EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT)
#endif
/* Based on `is_sane()` flags in "backend/common.h") */
#define IS_CTL_F (0x00000001) /* ASCII control (incl. DEL) */
#define IS_PRT_F (0x00000002) /* ASCII printable (incl. space) */
#define IS_SPC_F (0x00000004 | IS_PRT_F) /* Space */
#define IS_HSH_F (0x00000008 | IS_PRT_F) /* Hash sign # */
#define IS_AST_F (0x00000010 | IS_PRT_F) /* Asterisk sign * */
#define IS_PLS_F (0x00000020 | IS_PRT_F) /* Plus sign + */
#define IS_MNS_F (0x00000040 | IS_PRT_F) /* Minus sign - */
#define IS_NUM_F (0x00000080 | IS_PRT_F) /* Number 0-9 */
#define IS_UPO_F (0x00000100 | IS_PRT_F) /* Uppercase letter, apart from A-F, T and X */
#define IS_UAD_F (0x00000200 | IS_PRT_F) /* Uppercase A, D (hex, CALCIUM/FIM/DAFT) */
#define IS_UBC_F (0x00000400 | IS_PRT_F) /* Uppercase B, C (hex, CALCIUM/FIM) */
#define IS_UE__F (0x00000800 | IS_PRT_F) /* Uppercase E (hex, FIM) */
#define IS_UF__F (0x00001000 | IS_PRT_F) /* Uppercase F (hex, DAFT) */
#define IS_UT__F (0x00002000 | IS_PRT_F) /* Uppercase T (DAFT) */
#define IS_UX__F (0x00004000 | IS_PRT_F) /* Uppercase X (SODIUM_X/ISBNX) */
#define IS_LWO_F (0x00008000 | IS_PRT_F) /* Lowercase letter, apart from a-f, t and x */
#define IS_LAD_F (0x00010000 | IS_PRT_F) /* Lowercase a, d (hex, CALCIUM/FIM/DAFT) */
#define IS_LBC_F (0x00020000 | IS_PRT_F) /* Lowercase b, c (hex, CALCIUM/FIM) */
#define IS_LE__F (0x00040000 | IS_PRT_F) /* Lowercase e (hex, FIM) */
#define IS_LF__F (0x00080000 | IS_PRT_F) /* Lowercase f (hex, DAFT) */
#define IS_LT__F (0x00100000 | IS_PRT_F) /* Lowercase t (DAFT) */
#define IS_LX__F (0x00200000 | IS_PRT_F) /* Lowercase x (SODIUM_X/ISBNX) */
#define IS_C82_F (0x00400000 | IS_PRT_F) /* CSET82 punctuation (apart from *, + and -) */
#define IS_SIL_F (0x00800000 | IS_PRT_F) /* SILVER/TECHNETIUM punctuation .$/% (apart from space, + and -) */
#define IS_CLI_F (0x01000000 | IS_PRT_F) /* CALCIUM INNER punctuation $:/. (apart from + and -) (Codabar) */
#define IS_ARS_F (0x02000000 | IS_PRT_F) /* ARSENIC uppercase subset (VIN) */
#define IS_UHX_F (IS_UAD_F | IS_UBC_F | IS_UE__F | IS_UF__F) /* Uppercase hex */
#define IS_LHX_F (IS_LAD_F | IS_LBC_F | IS_LE__F | IS_LF__F) /* Lowercase hex */
#define IS_UPR_F (IS_UPO_F | IS_UHX_F) /* Uppercase letters */
#define IS_LWR_F (IS_LWO_F | IS_LHX_F) /* Lowercase letters */
/* Flag table for `is_chr()` and `is_sane()` (taken from "backend/common.c") */
#define IS_CLS_F (IS_CLI_F | IS_SIL_F)
static const unsigned int flgs[256] = {
IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, /*00-07*/
IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, /*08-0F*/
IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, /*10-17*/
IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, IS_CTL_F, /*18-1F*/
IS_SPC_F, IS_C82_F, IS_C82_F, IS_HSH_F, /*20-23*/ /* !"# */
IS_CLS_F, IS_SIL_F | IS_C82_F, IS_C82_F, IS_C82_F, /*24-27*/ /* $%&' */
IS_C82_F, IS_C82_F, IS_AST_F, IS_PLS_F, /*28-2B*/ /* ()*+ */
IS_C82_F, IS_MNS_F, IS_CLS_F | IS_C82_F, IS_CLS_F | IS_C82_F, /*2C-2F*/ /* ,-./ */
IS_NUM_F, IS_NUM_F, IS_NUM_F, IS_NUM_F, /*30-33*/ /* 0123 */
IS_NUM_F, IS_NUM_F, IS_NUM_F, IS_NUM_F, /*34-37*/ /* 4567 */
IS_NUM_F, IS_NUM_F, IS_CLI_F | IS_C82_F, IS_C82_F, /*38-3B*/ /* 89:; */
IS_C82_F, IS_C82_F, IS_C82_F, IS_C82_F, /*3C-3F*/ /* <=>? */
IS_PRT_F, IS_ARS_F | IS_UAD_F, IS_ARS_F | IS_UBC_F, IS_ARS_F | IS_UBC_F, /*40-43*/ /* @ABC */
IS_ARS_F | IS_UAD_F, IS_ARS_F | IS_UE__F, IS_ARS_F | IS_UF__F, IS_ARS_F | IS_UPO_F, /*44-47*/ /* DEFG */
IS_ARS_F | IS_UPO_F, IS_UPO_F, IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, /*48-4B*/ /* HIJK */
IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, IS_UPO_F, /*4C-4F*/ /* LMNO */
IS_ARS_F | IS_UPO_F, IS_UPO_F, IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, /*50-53*/ /* PQRS */
IS_ARS_F | IS_UT__F, IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, /*53-57*/ /* TUVW */
IS_ARS_F | IS_UX__F, IS_ARS_F | IS_UPO_F, IS_ARS_F | IS_UPO_F, IS_PRT_F, /*58-5B*/ /* XYZ[ */
IS_PRT_F, IS_PRT_F, IS_PRT_F, IS_C82_F, /*5C-5F*/ /* \]^_ */
IS_PRT_F, IS_LAD_F, IS_LBC_F, IS_LBC_F, /*60-63*/ /* `abc */
IS_LAD_F, IS_LE__F, IS_LF__F, IS_LWO_F, /*64-67*/ /* defg */
IS_LWO_F, IS_LWO_F, IS_LWO_F, IS_LWO_F, /*68-6B*/ /* hijk */
IS_LWO_F, IS_LWO_F, IS_LWO_F, IS_LWO_F, /*6C-6F*/ /* lmno */
IS_LWO_F, IS_LWO_F, IS_LWO_F, IS_LWO_F, /*70-73*/ /* pqrs */
IS_LT__F, IS_LWO_F, IS_LWO_F, IS_LWO_F, /*74-77*/ /* tuvw */
IS_LX__F, IS_LWO_F, IS_LWO_F, IS_PRT_F, /*78-7B*/ /* xyz{ */
IS_PRT_F, IS_PRT_F, IS_PRT_F, IS_CTL_F, /*7C-7F*/ /* |}~D */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*80-9F*/
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*A0-BF*/
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*C0-DF*/
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*E0-FF*/
};
/* Verifies that a string only uses valid characters */
static int is_sane(const unsigned int flg, const unsigned char source[], const int length) {
int i;
for (i = 0; i < length; i++) {
if (!(flgs[source[i]] & flg)) {
return 0;
}
}
return 1;
}
#define NEON_F (IS_NUM_F) /* NEON "0123456789" */
#define SODIUM_MNS_F (IS_NUM_F | IS_MNS_F) /* SODIUM_MNS "0123456789-" */
#define SODIUM_PLS_F (IS_NUM_F | IS_PLS_F) /* SODIUM_PLS "0123456789+" */
#define SODIUM_X_F (IS_NUM_F | IS_UX__F | IS_LX__F) /* SODIUM_X "0123456789Xx" */
#define ISBNX_ADDON_SANE_F (IS_NUM_F | IS_UX__F | IS_LX__F | IS_PLS_F) /* ISBNX_ADDON_SANE "0123456789Xx+" */
/* SILVER "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%" + lowercase */
#define SILVER_F (IS_NUM_F | IS_UPR_F | IS_LWR_F | IS_MNS_F | IS_SIL_F | IS_SPC_F | IS_PLS_F)
/* CALCIUM "0123456789-$:/.+ABCD" + lowercase */
#define CALCIUM_F (IS_NUM_F | IS_MNS_F | IS_CLI_F | IS_PLS_F | IS_UAD_F | IS_UBC_F | IS_LAD_F | IS_LBC_F)
/* FIM "ABCDE" + lowercase */
#define FIM_F (IS_UAD_F | IS_UBC_F | IS_UE__F | IS_LAD_F | IS_LBC_F | IS_LE__F)
/* GDSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz #" */
#define GDSET_F (IS_NUM_F | IS_UPR_F | IS_LWR_F | IS_SPC_F | IS_HSH_F)
#define KRSET_F (IS_NUM_F | IS_UPR_F | IS_LWR_F)
/* ARSENIC "0123456789ABCDEFGHJKLMNPRSTUVWXYZ" (no lowercase) */
#define ARSENIC_F (IS_NUM_F | IS_ARS_F)
/* SHKASUTSET "1234567890-ABCDEFGHIJKLMNOPQRSTUVWXYZ" + lowercase */
#define SHKASUTSET_F (IS_NUM_F | IS_MNS_F | IS_UPR_F | IS_LWR_F)
#define SSET_F (IS_NUM_F | IS_UHX_F) /* SSET "0123456789ABCDEF" (no lowercase) */
/* DAFT "FADT" + lowercase */
#define DAFT_F (IS_UAD_F | IS_UF__F | IS_UT__F | IS_LAD_F | IS_LF__F | IS_LT__F)
/* RUBIDIUM "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ " + lowercase */
#define RUBIDIUM_F (IS_NUM_F | IS_UPR_F | IS_LWR_F | IS_SPC_F)
#define ASCII_PRT_F (IS_PRT_F) /* ASCII printable */
#define ASCII_F (IS_PRT_F | IS_CTL_F) /* ASCII */
struct settings_item {
const int idx, symbology, sane_flag;
const int option_1_min, option_1_max, option_2_min, option_2_max, option_3, len_min, len_max;
};
static const struct settings_item settings[] = {
{ 0, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 1, BARCODE_CODE11, SODIUM_MNS_F, 0, -1, 0, 2, 0, 1, 140 },
{ 2, BARCODE_C25STANDARD, NEON_F, 0, -1, 0, 2, 0, 1, 112 },
{ 3, BARCODE_C25INTER, NEON_F, 0, -1, 0, 2, 0, 1, 125 },
{ 4, BARCODE_C25IATA, NEON_F, 0, -1, 0, 2, 0, 1, 80 },
{ 5, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 6, BARCODE_C25LOGIC, NEON_F, 0, -1, 0, 2, 0, 1, 113 },
{ 7, BARCODE_C25IND, NEON_F, 0, -1, 0, 2, 0, 1, 79 },
{ 8, BARCODE_CODE39, SILVER_F, 0, -1, 0, 2, 0, 1, 86 },
{ 9, BARCODE_EXCODE39, SILVER_F, 0, -1, 0, 2, 0, 1, 86 },
{ 10, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 11, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 12, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 13, BARCODE_EANX, SODIUM_PLS_F, 0, -1, 0, -1, 0, 1, 19 },
{ 14, BARCODE_EANX_CHK, SODIUM_PLS_F, 0, -1, 0, -1, 0, 1, 19 },
{ 15, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 16, BARCODE_GS1_128, ASCII_PRT_F, 0, -1, 0, -1, 0, 3, 198 },
{ 17, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 18, BARCODE_CODABAR, CALCIUM_F, 0, -1, 0, 2, 0, 3, 103 },
{ 19, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 20, BARCODE_CODE128, 0, 0, -1, 0, -1, 0, 1, 198 },
{ 21, BARCODE_DPLEIT, NEON_F, 0, -1, 0, -1, 0, 1, 13 },
{ 22, BARCODE_DPIDENT, NEON_F, 0, -1, 0, -1, 0, 1, 11 },
{ 23, BARCODE_CODE16K, 0, -1, 16, 0, -1, 0, 1, 154 },
{ 24, BARCODE_CODE49, ASCII_F, 2, 8, 0, -1, 0, 1, 81 },
{ 25, BARCODE_CODE93, ASCII_F, 0, -1, 0, 1, 0, 1, 123 },
{ 26, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 27, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 28, BARCODE_FLAT, NEON_F, 0, -1, 0, -1, 0, 1, 128 },
{ 29, BARCODE_DBAR_OMN, NEON_F, 0, -1, 0, -1, 0, 1, 14 },
{ 30, BARCODE_DBAR_LTD, NEON_F, 0, -1, 0, -1, 0, 1, 14 },
{ 31, BARCODE_DBAR_EXP, ASCII_PRT_F, 0, -1, 0, -1, 0, 3, 74 },
{ 32, BARCODE_TELEPEN, ASCII_F, 0, -1, 0, -1, 0, 1, 69 },
{ 33, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 34, BARCODE_UPCA, SODIUM_PLS_F, 0, -1, 0, -1, 0, 1, 18 },
{ 35, BARCODE_UPCA_CHK, SODIUM_PLS_F, 0, -1, 0, -1, 0, 1, 18 },
{ 36, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 37, BARCODE_UPCE, SODIUM_PLS_F, 0, -1, 0, -1, 0, 1, 14 },
{ 38, BARCODE_UPCE_CHK, SODIUM_PLS_F, 0, -1, 0, -1, 0, 1, 14 },
{ 39, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 40, BARCODE_POSTNET, NEON_F, 0, -1, 0, -1, 0, 1, 38 },
{ 41, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 42, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 43, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 44, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 45, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 46, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 47, BARCODE_MSI_PLESSEY, NEON_F, 0, -1, 0, 16, 0, 1, 92 },
{ 48, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 49, BARCODE_FIM, FIM_F, 0, -1, 0, -1, 0, 1, 1 },
{ 50, BARCODE_LOGMARS, SILVER_F, 0, -1, 0, 2, 0, 1, 30 },
{ 51, BARCODE_PHARMA, NEON_F, 0, -1, 0, -1, 0, 1, 6 },
{ 52, BARCODE_PZN, NEON_F, 0, -1, 0, 1, 0, 1, 8 },
{ 53, BARCODE_PHARMA_TWO, NEON_F, 0, -1, 0, -1, 0, 1, 8 },
{ 54, BARCODE_CEPNET, NEON_F, 0, -1, 0, -1, 0, 8, 8 },
{ 55, BARCODE_PDF417, 0, -1, 8, 0, 30, 0, 1, 2710 },
{ 56, BARCODE_PDF417COMP, 0, -1, 8, 0, 30, 0, 1, 2710 },
{ 57, BARCODE_MAXICODE, 0, -1, 6, 0, 100, 0, 1, 138 },
{ 58, BARCODE_QRCODE, 0, -1, 4, 0, 40, ZINT_FULL_MULTIBYTE, 1, 7089 },
{ 59, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 60, BARCODE_CODE128AB, 0, 0, -1, 0, -1, 0, 1, 99 },
{ 61, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 62, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 63, BARCODE_AUSPOST, GDSET_F, 0, -1, 0, -1, 0, 8, 23 },
{ 64, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 65, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 66, BARCODE_AUSREPLY, GDSET_F, 0, -1, 0, -1, 0, 1, 8 },
{ 67, BARCODE_AUSROUTE, GDSET_F, 0, -1, 0, -1, 0, 1, 8 },
{ 68, BARCODE_AUSREDIRECT, GDSET_F, 0, -1, 0, -1, 0, 1, 8 },
{ 69, BARCODE_ISBNX, ISBNX_ADDON_SANE_F, 0, -1, 0, -1, 0, 9, 19 },
{ 70, BARCODE_RM4SCC, KRSET_F, 0, -1, 0, -1, 0, 1, 50 },
{ 71, BARCODE_DATAMATRIX, 0, 0, -1, 0, 48, DM_SQUARE | DM_ISO_144, 1, 3550 },
{ 72, BARCODE_EAN14, NEON_F, 0, -1, 0, -1, 0, 1, 13 },
{ 73, BARCODE_VIN, ARSENIC_F, 0, -1, 0, -1, 0, 17, 17 },
{ 74, BARCODE_CODABLOCKF, 0, -1, 44, -1, 67, 0, 1, 2725 },
{ 75, BARCODE_NVE18, NEON_F, 0, -1, 0, -1, 0, 1, 17 },
{ 76, BARCODE_JAPANPOST, SHKASUTSET_F, 0, -1, 0, -1, 0, 1, 20 },
{ 77, BARCODE_KOREAPOST, NEON_F, 0, -1, 0, -1, 0, 1, 6 },
{ 78, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 79, BARCODE_DBAR_STK, NEON_F, 0, -1, 0, -1, 0, 1, 14 },
{ 80, BARCODE_DBAR_OMNSTK, NEON_F, 0, -1, 0, -1, 0, 1, 14 },
{ 81, BARCODE_DBAR_EXPSTK, ASCII_PRT_F, 0, -1, 0, 11, 0, 1, 74 },
{ 82, BARCODE_PLANET, NEON_F, 0, -1, 0, -1, 0, 1, 38 },
{ 83, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 84, BARCODE_MICROPDF417, 0, 0, -1, 0, 30, 0, 1, 366 },
{ 85, BARCODE_USPS_IMAIL, SODIUM_MNS_F, 0, -1, 0, -1, 0, 1, 32 },
{ 86, BARCODE_PLESSEY, SSET_F, 0, -1, 0, -1, 0, 1, 67 },
{ 87, BARCODE_TELEPEN_NUM, SODIUM_X_F, 0, -1, 0, -1, 0, 1, 136 },
{ 88, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 89, BARCODE_ITF14, NEON_F, 0, -1, 0, -1, 0, 1, 13 },
{ 90, BARCODE_KIX, KRSET_F, 0, -1, 0, -1, 0, 1, 18 },
{ 91, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 92, BARCODE_AZTEC, 0, -1, 4, 0, 36, 0, 1, 4483 },
{ 93, BARCODE_DAFT, DAFT_F, 0, -1, 50, 900, 0, 1, 576 },
{ 94, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 95, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 96, BARCODE_DPD, KRSET_F, 0, -1, 0, -1, 0, 27, 28 },
{ 97, BARCODE_MICROQR, 0, -1, 4, 0, 4, 0, 1, 35 },
{ 98, BARCODE_HIBC_128, SILVER_F, 0, -1, 0, -1, 0, 1, 110 },
{ 99, BARCODE_HIBC_39, SILVER_F, 0, -1, 0, 2, 0, 1, 70 },
{ 100, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 101, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 102, BARCODE_HIBC_DM, SILVER_F, 0, -1, 0, 48, DM_SQUARE | DM_ISO_144, 1, 110 },
{ 103, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 104, BARCODE_HIBC_QR, SILVER_F, -1, 4, 0, 40, ZINT_FULL_MULTIBYTE, 1, 110 },
{ 105, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 106, BARCODE_HIBC_PDF, SILVER_F, -1, 8, 0, 30, 0, 1, 110 },
{ 107, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 108, BARCODE_HIBC_MICPDF, SILVER_F, 0, -1, 0, 30, 0, 1, 110 },
{ 109, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 110, BARCODE_HIBC_BLOCKF, SILVER_F, -1, 44, -1, 67, 0, 1, 110 },
{ 111, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 112, BARCODE_HIBC_AZTEC, SILVER_F, -1, 4, 0, 36, 0, 1, 110 },
{ 113, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 114, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 115, BARCODE_DOTCODE, 0, 0, -1, 0, 200, 0, 1, 900 },
{ 116, BARCODE_HANXIN, 0, -1, 5, 0, 84, ZINT_FULL_MULTIBYTE, 1, 7827 },
{ 117, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 118, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 119, BARCODE_MAILMARK_2D, RUBIDIUM_F, 0, -1, 0, 30, DM_SQUARE | DM_ISO_144, 28, 90 },
{ 120, BARCODE_UPU_S10, KRSET_F, 0, -1, 0, -1, 0, 12, 13 },
{ 121, BARCODE_MAILMARK_4S, RUBIDIUM_F, 0, -1, 0, -1, 0, 14, 26 },
{ 122, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 123, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 124, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 125, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 126, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 127, /*symbology*/ -1, /*sane_flag*/ 0, /*opt_1*/ 0, -1, /*opt_2*/ 0, -1, /*opt_3*/ 0, /*len*/ 0, -1 },
{ 128, BARCODE_AZRUNE, NEON_F, 0, -1, 0, -1, 0, 1, 3 },
{ 129, BARCODE_CODE32, NEON_F, 0, -1, 0, -1, 0, 1, 8 },
{ 130, BARCODE_EANX_CC, SODIUM_PLS_F, 0, 2, 0, -1, 0, 1, 338 },
{ 131, BARCODE_GS1_128_CC, ASCII_PRT_F, 0, 3, 0, -1, 0, 1, 2361 },
{ 132, BARCODE_DBAR_OMN_CC, NEON_F, 0, 2, 0, -1, 0, 1, 338 },
{ 133, BARCODE_DBAR_LTD_CC, NEON_F, 0, 2, 0, -1, 0, 1, 338 },
{ 134, BARCODE_DBAR_EXP_CC, ASCII_PRT_F, 0, 2, 0, -1, 0, 1, 338 },
{ 135, BARCODE_UPCA_CC, SODIUM_PLS_F, 0, 2, 0, -1, 0, 1, 338 },
{ 136, BARCODE_UPCE_CC, SODIUM_PLS_F, 0, 2, 0, -1, 0, 1, 338 },
{ 137, BARCODE_DBAR_STK_CC, NEON_F, 0, 2, 0, -1, 0, 1, 338 },
{ 138, BARCODE_DBAR_OMNSTK_CC, NEON_F, 0, 2, 0, -1, 0, 1, 338 },
{ 139, BARCODE_DBAR_EXPSTK_CC, ASCII_PRT_F, 0, 2, 0, 11, 0, 1, 338 },
{ 140, BARCODE_CHANNEL, NEON_F, 0, -1, 3, 8, 0, 1, 7 },
{ 141, BARCODE_CODEONE, 0, 0, -1, 0, 10, 0, 1, 3550 },
{ 142, BARCODE_GRIDMATRIX, 0, 0, 5, 0, 13, ZINT_FULL_MULTIBYTE, 1, 1751 },
{ 143, BARCODE_UPNQR, 0, 0, -1, 0, -1, ZINT_FULL_MULTIBYTE, 1, 411 },
{ 144, BARCODE_ULTRA, 0, -1, 5, 0, 2, ULTRA_COMPRESSION, 1, 504 },
{ 145, BARCODE_RMQR, 0, -1, 4, 0, 38, 0, 1, 361 },
};
/* Make sure value `v` is between `min` and `max` */
static int clamp(const int v, const int min, const int max) {
return v < min ? min : v > max ? max : v;
}
/* Set `symbol` based on `settings[idx]`, returning new length after consuming some `*p_input` (`data`) */
static int set_symbol(struct zint_symbol *symbol, const int idx, const int chk_sane, const int no_eci,
const unsigned char **p_input, const size_t size) {
const unsigned char *input = *p_input;
int length = (int) size;
const struct settings_item *si;
assert(idx >= 0 && idx < ZARRAY_SIZE(settings));
assert(settings[idx].symbology > 0);
assert(settings[idx].symbology == idx);
si = settings + idx;
ZBarcode_Reset(symbol);
symbol->symbology = si->symbology;
if (length < si->len_min) {
return 0;
}
/* `input_mode` */
if (length > si->len_min) {
symbol->input_mode = (*input++ << 3); /* Note DATA/UNICODE/GS1_MODE must be set by caller */
length--;
}
/* `option_1` */
if (length > si->len_min && si->option_1_min <= si->option_1_max) {
unsigned char ch = *input++;
if (ch != 0xFF) { /* Special case 255 as default (-1) */
if (si->option_1_min + 1 == si->option_1_max) { /* Only one in it? */
symbol->option_1 = (ch & 1) ? si->option_1_min : si->option_1_max; /* Odd/even */
} else {
symbol->option_1 = clamp(ch, si->option_1_min, si->option_1_max);
}
}
length--;
}
/* `option_2` */
if (length > si->len_min && si->option_2_min <= si->option_2_max) {
if (si->option_2_min + 1 == si->option_2_max) { /* Only one in it? */
symbol->option_2 = (*input++ & 1) ? si->option_2_min : si->option_2_max; /* Odd/even */
} else {
symbol->option_2 = clamp(*input++, si->option_2_min, si->option_2_max);
}
length--;
}
/* `eci` */
if (!no_eci) {
if (length > si->len_min && (ZBarcode_Cap(symbol->symbology, ZINT_CAP_ECI) & ZINT_CAP_ECI)) {
symbol->eci = *input++;
/* Avoid invalid/unconvertible ECIs */
if (symbol->eci == 1) {
symbol->eci = 899; /* Binary */
} else if (symbol->eci > 35 && symbol->eci != 170) {
symbol->eci = 35; /* UTF-32LE */
} else if (symbol->eci == 2 || symbol->eci == 15 || symbol->eci == 19) {
symbol->eci++;
}
length--;
}
}
/* `option_3` */
if (length > si->len_min && si->option_3) {
if (*input++ & 1) { /* Odd/even */
symbol->option_3 = si->option_3;
}
length--;
}
#ifdef Z_FUZZ_SET_OUTPUT_OPTIONS
if (length > si->len_min) {
symbol->output_options = *input++ & OUTPUT_OPTIONS_MASK;
length--;
}
#endif
if (length > si->len_max) {
return 0;
}
if (chk_sane && si->sane_flag && !is_sane(si->sane_flag, input, length)) {
return 0;
}
#ifdef Z_FUZZ_DEBUG
symbol->debug = ZINT_DEBUG_PRINT;
#endif
*p_input = input;
assert(length >= si->len_min && length <= si->len_max);
return length;
}
/* vim: set ts=4 sw=4 et : */
#endif /* Z_FUZZ_H */

View file

@ -0,0 +1,87 @@
/* fuzz_data.c - fuzzer for libzint (DATA_MODE, all symbologies except GS1_128, DBAR_EXP/STK & composites) */
/*
libzint - the open source barcode library
Copyright (C) 2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
/* SPDX-License-Identifier: BSD-3-Clause */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if 0
#define Z_FUZZ_DEBUG /* Set `symbol->debug` flag */
#define Z_FUZZ_SET_OUTPUT_OPTIONS /* Set `symbol->output_options` */
#endif
#include "fuzz.h"
int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {
struct zint_symbol *symbol;
int idx;
/* Ignore empty or very large input */
if (size < 1 || size > 10000) {
return 0;
}
symbol = ZBarcode_Create();
assert(symbol);
for (idx = 0; idx < ZARRAY_SIZE(settings); idx++) {
const unsigned char *input;
int length;
int ret;
if (!ZBarcode_ValidID(idx)) {
continue;
}
if (idx == BARCODE_GS1_128 || idx == BARCODE_DBAR_EXP || idx == BARCODE_DBAR_EXPSTK
|| (ZBarcode_Cap(idx, ZINT_CAP_COMPOSITE) & ZINT_CAP_COMPOSITE)) {
continue;
}
input = data;
length = set_symbol(symbol, idx, 1 /*chk_sane*/, 0 /*no_eci*/, &input, size);
if (!length) {
continue;
}
ret = ZBarcode_Encode(symbol, input, length);
assert(ret != ZINT_ERROR_ENCODING_PROBLEM);
}
ZBarcode_Delete(symbol);
return 0;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* vim: set ts=4 sw=4 et : */

Binary file not shown.

View file

@ -0,0 +1,123 @@
/* fuzz_gs1.c - fuzzer for libzint (GS1-enabled symbologies, GS1_MODE) */
/*
libzint - the open source barcode library
Copyright (C) 2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
/* SPDX-License-Identifier: BSD-3-Clause */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if 0
#define Z_FUZZ_DEBUG /* Set `symbol->debug` flag */
#define Z_FUZZ_SET_OUTPUT_OPTIONS /* Set `symbol->output_options` */
#endif
#include "fuzz.h"
int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {
static const int symbologies[] = {
BARCODE_AZTEC, BARCODE_CODE16K, BARCODE_CODE49, BARCODE_CODEONE, BARCODE_DATAMATRIX, BARCODE_DBAR_EXP,
BARCODE_DBAR_EXPSTK, BARCODE_DOTCODE, BARCODE_GS1_128, BARCODE_QRCODE, BARCODE_RMQR, BARCODE_ULTRA,
BARCODE_EANX_CC, BARCODE_GS1_128_CC, BARCODE_DBAR_OMN_CC, BARCODE_DBAR_LTD_CC, BARCODE_DBAR_EXP_CC,
BARCODE_UPCA_CC, BARCODE_UPCE_CC, BARCODE_DBAR_STK_CC, BARCODE_DBAR_OMNSTK_CC, BARCODE_DBAR_EXPSTK_CC,
};
struct zint_symbol *symbol;
unsigned char *gs1_buf;
int i;
/* Ignore empty or very large input */
if (size < 1 || size > 10000) {
return 0;
}
symbol = ZBarcode_Create();
assert(symbol);
gs1_buf = (unsigned char *) malloc(size + 2);
assert(gs1_buf);
gs1_buf[0] = '['; /* Add dummy AI - along with GS1NOCHECK_MODE disables GS1 verification */
gs1_buf[1] = ']';
for (i = 0; i < ZARRAY_SIZE(symbologies); i++) {
static const char primary_ai[] = "[01]12345678901231";
static const char primary_upce[] = "12345670";
static const char primary[] = "123456789012";
const int idx = symbologies[i];
const int is_composite = ZBarcode_Cap(idx, ZINT_CAP_COMPOSITE) & ZINT_CAP_COMPOSITE;
const unsigned char *input;
int length;
int ret;
assert(ZBarcode_ValidID(idx));
input = data;
length = set_symbol(symbol, idx, !is_composite /*chk_sane*/, 1 /*no_eci*/, &input, size);
if (!length) {
continue;
}
if (is_composite) {
if (idx == BARCODE_GS1_128_CC || idx == BARCODE_DBAR_EXP_CC || idx == BARCODE_DBAR_EXPSTK_CC) {
strcpy(symbol->primary, primary_ai);
} else if (idx == BARCODE_UPCE_CC) {
strcpy(symbol->primary, primary_upce);
} else {
strcpy(symbol->primary, primary);
}
}
/* Try it first without GS1NOCHECK_MODE */
symbol->input_mode = (symbol->input_mode & ~0x07) | GS1_MODE;
ret = ZBarcode_Encode(symbol, input, length);
assert(ret != ZINT_ERROR_ENCODING_PROBLEM);
ZBarcode_Clear(symbol);
/* Now with GS1NOCHECK_MODE */
symbol->input_mode = (symbol->input_mode & ~0x07) | GS1_MODE | GS1NOCHECK_MODE;
symbol->input_mode &= ~GS1PARENS_MODE;
memcpy(gs1_buf + 2, input, length);
ret = ZBarcode_Encode(symbol, gs1_buf, length + 2);
assert(ret != ZINT_ERROR_ENCODING_PROBLEM);
}
(void) free(gs1_buf);
ZBarcode_Delete(symbol);
return 0;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* vim: set ts=4 sw=4 et : */

View file

@ -0,0 +1,10 @@
"%"
"%%"
"[01]"
"[10]"
"[15]"
"[17]"
"[20]"
"[3103]"
"[3202]"
"[91]"

Binary file not shown.

View file

@ -0,0 +1,843 @@
/* gen_corpora.c - write out initial fuzz data for zint, allowing for how `set_symbol()` in "fuzz.h" uses first X
bytes to set various `zint_symbol` members (namely `input_mode`, `option_1`, `option_2`, `eci`, `option_3`) */
/*
libzint - the open source barcode library
Copyright (C) 2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
/* SPDX-License-Identifier: BSD-3-Clause */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h> /* mkdir(2) */
#include "fuzz.h"
/* Data item */
struct item {
int test_fuzz_idx;
int symbology;
int input_mode;
int eci;
int option_1;
int option_2;
int option_3;
char *data;
int length;
};
/* DATA_MODE data */
static const struct item data_data[] = {
/* 0*/ { 0, BARCODE_CODEONE, -1, -1, -1, -1, -1, "3333P33B\035333V3333333333333\0363", -1 }, /* #181 Nico Gunkel, OSS-Fuzz */
/* 1*/ { 1, BARCODE_CODEONE, -1, -1, -1, -1, -1, "{{-06\024755712162106130000000829203983\377", -1 }, /* #232 Jan Schrewe, CI-Fuzz, out-of-bounds in is_last_single_ascii() sp + 1 */
/* 2*/ { 2, BARCODE_CODEONE, -1, -1, -1, -1, -1, "\000\000\000\367\000\000\000\000\000\103\040\000\000\244\137\140\140\000\000\000\000\000\000\000\000\000\005\000\000\000\000\000\165\060\060\060\060\061\060\060\114\114\060\010\102\102\102\102\102\102\102\102\057\102\100\102\057\233\100\102", 60 }, /* #300 (#4) Andre Maute (`c1_c40text_cnt()` not accounting for extended ASCII shifts) */
/* 3*/ { 3, BARCODE_CODEONE, -1, -1, -1, 10, -1, "\153\153\153\060\001\000\134\153\153\015\015\353\362\015\015\015\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\362\362\000", 65 }, /* #300 (#8) Andre Maute (`c1_encode()` looping on latch) */
/* 4*/ { 4, BARCODE_CODEONE, -1, -1, -1, 10, -1, "\015\015\353\362\015\015\015\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\362\362\000", 39 }, /* #300 (#8 shortened) Andre Maute */
/* 5*/ { 5, BARCODE_CODEONE, -1, -1, -1, 10, -1, "\153\153\153\153\153\060\001\000\000\134\153\153\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\153\153\153\153\153\043\000\000\307\000\147\000\000\000\043\113\153\162\162\215\220", 90 }, /* #300 (#12) Andre Maute (too small buffer for Version T) */
/* 6*/ { 0, BARCODE_TELEPEN, -1, -1, -1, -1, -1, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 69 }, /* #181 Nico Gunkel OSS-Fuzz */
/* 7*/ { 2, BARCODE_TELEPEN_NUM, -1, -1, -1, -1, -1, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 70 },
/* 8*/ { 3, BARCODE_TELEPEN_NUM, -1, -1, -1, -1, -1, "0404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404", 136 },
/* 9*/ { 5, BARCODE_TELEPEN_NUM, -1, -1, -1, -1, -1, "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000X", 136 },
/* 10*/ { 6, BARCODE_TELEPEN_NUM, -1, -1, -1, -1, -1, "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", 136 },
/* 11*/ { 0, BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, "\034\034I", 3 }, /* #181 Christian Hartlage OSS-Fuzz */
/* 12*/ { 0, BARCODE_AZTEC, -1, -1, -1, -1, -1,
"\133\060\060\060\135\060\125\125\125\125\140\060\125\125\125\125\060\060\060\271\060\060\125\103\164\125\125\125\377\377\125\125"
"\125\125\125\125\125\133\060\076\060\135\261\177\261\261\261\236\261\261\261\040\261\261\261\261\261\261\261\020\261\261\261\261"
"\261\261\265\261\261\261\261\261\261\261\261\261\261\261\261\040\224\261\261\261\261\261\000\000\004\000\031\060\031\031\031\031"
"\031\031\031\031\261\261\040\261\261\261\261\261\261\261\020\261\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\261\261\261\261\261\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\135\135\135\135\135\135"
"\135\335\135\060\060\010\010\010\010\010\060", 2251
}, /* Original OSS-Fuzz triggering data for malloc leak */
/* 13*/ { 1, BARCODE_AZTEC, -1, -1, -1, -1, -1,
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\000\060\060\060\060\000\060\060\000\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\060\005\060\060\060\060\060\060\060\005\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\000\000\060\350\060\060\060\060\060\350\060\345\060\343\060\060\060\005\060\060\060"
"\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\005\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060"
"\060\060\060\060\060\175\175\175\175\060\175\175\175\175\175\060\060\060\060\175\060\175\175\175\175\060\060\060\060\005\060\060"
"\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\005\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\000\060\060\060\060\060\005\060\060\060\060\060\005\005\060\005\060\060\060\060\060\060\005"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\353\060\060\353"
"\060\060\060\060\353\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060"
"\060\060\060\060\353\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060"
"\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353"
"\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060"
"\060\060\353\060\060\060\060\060\353\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060"
"\060\060\353\060\060\060\060\353\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060"
"\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060"
"\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060"
"\353\060\060\060\060\353\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353"
"\060\060\060\060\353\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\264\060"
"\060\060\060\060\264\060\060\060\060\060\264\060\060\060\060\264\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060"
"\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060"
"\353\060\060\060\060\060\353\060\060\060\060\060\353\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353"
"\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060"
"\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060"
"\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060"
"\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060"
"\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060"
"\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060"
"\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353"
"\060\060\060\060\353\060\060\060\060\060\353\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060"
"\060\060\060\060\353\060\060\060\060\060\353\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060"
"\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\060"
"\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\353\060\060\060\060\353\060\060\060\060\060\353\060\060\060\060\353"
"\060\060\060\060\060\353\060\060\060\060\060\353\060\060\353\060\060\060\343\060\060\060\060\060\060\060\060\060\005\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\377\060\060\060\060\060\060\060"
"\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\005\060\060\060\060"
"\060\060\060\060\060\060\060\060\361\060\060\060\060\060\361\060\060\060\060\361\060\060\060\060\060\361\060\060\060\060\060\361"
"\060\060\060\361\060\060\060\005\060\060\060\060\060\060\060\005\060\060\060\060\060\005\363\060\362\060\060\060\060\377\060\060"
"\060\177\060\060\060\060\060\263\060\060\060\060\060\060\060\060\060\000\060\060\060\060\377\177\060\060\060\362\060\362\060\363"
"\060\363\060\177\060\377\060\060\060\060\060\060\060\377\177\060\355\060\057\060\060\060\377\060\377\060\060\060\177\000\060\000"
"\060\377\060\060\060\060\060\060\005\060\060\000\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\005\060\060"
"\060\060\060\060\060\371\060\060\060\363\060\060\060\060\060\060\362\060\060\060\060\060\362\060\363\060\362\060\060\060\060\377"
"\060\177\060\060\060\060\060\263\060\060\060\060\060\060\060\060\060\060\000\060\060\060\377\177\060\060\060\362\060\362\060\363"
"\060\363\060\060\377\057\060\060\060\060\060\060\377\177\060\355\060\060\060\060\060\377\060\377\060\060\060\177\000\060\000\060"
"\377\060\353\060\060\000\060\060\060\060\060\060\060\060\060\256\060\060\060\362\060\060\060\060\060\060\060\060\005\362\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\057\060\060\060\060\060\060\060\000\060\000\060\060\060\000\060\060"
"\057\060\060\060\060\060\377\060\377\060\060\060\060\060\060\060\060\060\060\060\060\000\060\060\347\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\000\060\377\060\060\060\377\060\363\060\363\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\362\060\060\060\060\060\060\362\347\060\354\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\005\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\005\060\060\060\000\060\000\060\060\060\060"
"\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\344\005\060\060\005\060\342\060"
"\060\060\060\060\060\060\060\060\060\060\060\005\060\000\060\060\060\060\060\060\060\060\060\060\377\060\060\060\060\005\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\005\060\060\060\060"
"\060\060\060\060\060\060\060\005\060\060\060\005\060\060\060\060\060\060\060\060\060\060\005\060\351\060\060\060\060\060\060\005"
"\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005"
"\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\005\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\005\060\060\060\005\060\060\060\060\005"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\005\060\060\060\175\175\060\175\060\060\060"
"\060\175\060\060\060\060\175\060\060\060\060\175\060\175\175\175\005\060\060\060\060\060\060\060\060\377\060\060\060\060\060\060"
"\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\005\060\342\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\005\060\060\060\345\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\005\060\371\060\060\060\060\060\060\060\060\060\060\060\361\060\060\060\060\060\005\361\060\060\060\060"
"\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\005\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\005\060\351\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\005\363\060\060\005\060\060\005\060\060\060\060\060\060\060\060\060\005\060\000\060"
"\060\060\060\060\060\060\362\060\060\060\060\060\060\060\060\060\060\060\005\060\005\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\000\060\060\060\060\060\060\060\060\060\005\060\377\060\005"
"\060\371\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\005\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060"
"\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\175\175\175\175\060\175\175\060\060\060\060\060\175\060\175\175"
"\175\005\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\005\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\005\060\060\060\060\060\060\060\060"
"\060\060\005\060\060\060\060\060\005\060\000\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060"
"\060\060\005\060\060\060\060\060\005\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\005\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\005\060\351\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\005\060\060\060"
"\060\005\060\060\060\005\060\362\060\060\060\060\060\060\060\060\060\060\060\060\377\060\060\000\177\060\060\000\060\377\060\353"
"\060\060\060\363\060\060\060\060\060\060\060\060\060\060\060\060\362\060\060\060\060\060\000\060\060\377\060\060\060\175\175\175"
"\175\060\060\060\175\175\175\175\060\060\005\060\005\060\005\060\060\060\060\000\000\060\060\060\060\060\060\377\060\060\060\060"
"\377\060\377\377\060\060\057\060\060\057\060\060\060\000\000\060\060", 2801
}, /* Original OSS-Fuzz triggering data for binary_string buffer overrun */
/* 14*/ { 2, BARCODE_AZTEC, -1, -1, 1, -1, -1,
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123",
4483
}, /* 4483 = (1664 (Max codewords) - 169 (ECC codewords) - 5/12 (D/L) - 3/12 (padding)) * 3 (3 4-bit digits per 12-bit wordcode) = 4483 */
/* 15*/ { 8, BARCODE_AZTEC, -1, -1, -1, 1, -1,
"\105\105\000\000\000\000\000\000\000\000\077\012\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\350\350\001\000\000\000\000\000"
"\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\002\222\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\077\012"
"\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\000\000\000\000\000\000\000\033\000\036\103\012\072\103\103\000\100\116\000\000"
"\000\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\012\000\000\000\000\072\103\103\103\103\012\012\000\365\365\365\365\365\365\374\365\365\365\365\365\000\000\001\000\000\000\000\000\100\377\337\377"
"\377\377\377\377\000\000\000\000\372\377\000\100\377\377\350\350\000\000\350\350\350\350\350\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\365\000"
"\000\000\000\000\000\000\000\000\377\377\377\350\350\350\350\350\350\350\350\350\350\350\350\350\350\061\350\350\350\350\354\350\350\350\350\350\001\000\000\000"
"\000\000\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\216\000\000\000\000\000\000\000\377\377\377\377\377\377\377\000\000"
"\377\365\374\365\365\365\365\001\236\365\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\064\064\064\064\064\064\064\064\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153"
"\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\064\064\064\064\064\064\064\064\064\064\044\064\064\064\064\064\064\064\064\064"
"\064\064\064\064\064\064\064\064\064\064\064\064\064\064\064\064\064\264\264\362\362\362\362\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242"
"\242\242\242\242\242\242\242\242\242\242\242\242\242\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\012\000\000\000\000\072\103\103\103\103\012\012\000\365\365\365\365\365"
"\365\374\365\365\365\365\365\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100\377\377\377\377\377\377\377\000\000\000\000"
"\000\000\000\100\377\377\350\350\000\000\350\350\350\350\350\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\365\000\000\000\000\000\000\000\266\266"
"\266\266\112\000\000\000\266\266\266\266\266\266\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\022\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\077\012\377"
"\377\377\072\376\376\350\350\350\350\350\000\000\000\000\001\000\000\000\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\100\116\000\000\000"
"\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\000\000\000\025\000\000\000\000\001\000\000\000\000\000\000\003\000\000\000\000\000\000\000\000"
"\000\000\012\000\000\000\000\072\103\103\103\103\012\012\000\365\365\365\365\365\365\374\365\365\365\365\365\000\000\000\311\000\000\000\000\100\377\337\377\377"
"\377\377\377\000\000\000\000\000\000\000\100\377\377\350\353\000\000\350\150\350\350\350\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\365\000\000"
"\000\000\000\000\000\047\000\377\377\377\350\350\350\350\350\350\350\350\350\350\350\350\350\350\254\350\350\350\350\354\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\350\350\350\350\350\001\000\000\127\000\000\000\036\103"
"\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\220\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\050\050\050\000\000\000"
"\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\000\000\000\000\266"
"\266\266\266\266\266\377\377\377\377\377\013\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\005\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\266\266\266\266\266\266\266\266\266\266\377\377\377\377\377\377\377\377\377\377\377\377\044"
"\377\377\377\377\377\377\050\064\064\064\000\000\000\000\072\376\376\350\350\350\350\350\350\377\377\377\377\377\377\377\377\377\377\377\377\377\005\377\377\377"
"\377\350\350\350\350\350\350\350\310\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\000\000\000\000\000\000\000\000\000\000\000\000\000\266\266"
"\266\266\266\266\377\377\377\377\377\013\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\005\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\266\266\266\266\266\266\266\266\266\266\377\377\377\377\377\377\377\377\377\377\377\377\044\377"
"\377\377\377\377\377\050\064\064\064\000\000\000\000\072\376\376\350\350\350\350\350\350\377\377\377\377\377\377\377\377\377\377\377\377\377\005\377\377\377\377"
"\350\350\350\350\350\350\350\310\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\310\000\064\064\064\064\064\064\064\064\064\064\064\064\064\064\073\064\064\064\064"
"\064\064\064\064\064\064\064\064\000\377\365\374\365\365\365\365\001\236\365\000\000\001\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\064\064\064\064\064\064\064\064\153\153\153\153\153"
"\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\337\266\266\266\000"
"\000\000\000\000\000\000\377\377\377\377\377\000\000\000\000\000\000\000\100\377\377\350\350\000\000\350\350\350\350\350\350\350\350\001\000\000\000\000\000\000"
"\036\103\012\072\103\365\000\000\000\000\000\000\000\000\000\377\377\377\350\350\350\350\350\350\350\350\350\350\350\350\350\350\254\350\350\350\350\354\350\350"
"\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\221\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\050\000\050\050\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\000\177\377\377\377"
"\046\000\000\000\000\000\000\027\027\027\027\027\027\027\027\027\027\027\027\000\027\027\027\027\000\004\000\000\000\000\000\135\000\044\103\000\000\377\377\377"
"\377\377\103\377\364\377\364",
2167
}, /* #300 (#2) Andre Maute */
/* 16*/ { 10, BARCODE_AZTEC, -1, -1, -1, 1, -1,
"\105\105\000\000\000\000\000\000\000\000\077\012\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\350\350\001\000\000\000\000\000"
"\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\002\222\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\077\012"
"\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\000\000\000\000\000\000\000\033\000\036\103\012\072\103\103\000\100\116\000\000"
"\000\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\012\000\000\000\000\072\103\103\103\103\012\012\000\365\365\365\365\365\365\374\365\365\365\365\365\000\000\001\000\000\000\000\000\100\377\337\377"
"\377\377\377\377\000\000\000\000\372\377\000\100\377\377\350\350\000\000\350\350\350\350\350\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\365\000"
"\000\000\000\000\000\000\000\000\377\377\377\350\350\350\350\350\350\350\350\350\350\350\350\350\350\061\350\350\350\350\354\350\350\350\350\350\001\000\000\000"
"\000\000\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\216\000\000\000\000\000\000\000\377\377\377\377\377\377\377\000\000"
"\377\365\374\365\365\365\365\001\236\365\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\064\064\064\064\064\064\064\064\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153"
"\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\064\064\064\064\064\064\064\064\064\064\044\064\064\064\064\064\064\064\064\064"
"\064\064\064\064\064\064\064\064\064\064\064\064\064\064\064\064\064\264\264\362\362\362\362\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242"
"\242\242\242\242\242\242\242\242\242\242\242\242\242\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\012\000\000\000\000\072\103\103\103\103\012\012\000\365\365\365\365\365"
"\365\374\365\365\365\365\365\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100\377\377\377\377\377\377\377\000\000\000\000"
"\000\000\000\100\377\377\350\350\000\000\350\350\350\350\350\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\365\000\000\000\000\000\000\000\266\266"
"\266\266\112\000\000\000\266\266\266\266\266\266\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\022\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\077\012\377"
"\377\377\072\376\376\350\350\350\350\350\000\000\000\000\001\000\000\000\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\100\116\000\000\000"
"\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\000\000\000\025\000\000\000\000\001\000\000\000\000\000\000\003\000\000\000\000\000\000\000\000"
"\000\000\012\000\000\000\000\072\103\103\103\103\012\012\000\365\365\365\365\365\365\374\365\365\365\365\365\000\000\000\311\000\000\000\000\100\377\337\377\377"
"\377\377\377\000\000\000\000\000\000\000\100\377\377\350\353\000\000\350\150\350\350\350\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\365\000\000"
"\000\000\000\000\000\047\000\377\377\377\350\350\350\350\350\350\350\350\350\350\350\350\350\350\254\350\350\350\350\354\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\350\350\350\350\350\001\000\000\127\000\000\000\036\103"
"\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\220\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\050\050\050\000\000\000"
"\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\000\000\000\000\266"
"\266\266\266\266\266\377\377\377\377\377\013\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\005\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\172\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\266\266\266\266\266\266\266\266\266\266\377\377\377\377\377\377\377\377\377\377\377\377\044"
"\377\377\377\377\377\377\050\064\064\064\000\000\000\000\072\376\376\350\350\350\350\350\350\377\377\377\377\377\377\377\377\377\377\377\377\377\005\377\377\377"
"\377\350\350\350\350\350\350\350\310\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\310\000\064\064\064\064\064\064\064\064\064\064\064\064\064\064\073\064\064\064\064\064\064\064\064\064\064\064"
"\064\000\377\365\374\365\365\365\365\001\236\365\000\000\001\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\064\064\064\064\064\064\064\064\153\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\153\153\153"
"\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\153\337\266\266\266\000"
"\000\000\000\000\000\000\377\377\377\377\377\000\000\000\000\000\000\000\100\377\377\350\350\000\000\350\350\350\350\350\350\350\350\001\000\000\000\000\000\000"
"\036\103\012\072\103\365\000\000\000\000\000\000\000\000\000\377\377\377\350\350\350\350\350\350\350\350\350\350\350\350\350\350\254\350\350\350\350\354\350\350"
"\350\350\350\001\000\000\000\000\000\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\000\221\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\050\000\050\050\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\004\000\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032"
"\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032\032"
"\032\032\032\032\032\032\032\032\032\032\032\032\032\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\032\032\032\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\000\177\377\377\377\046\000\000\000\000\000\000\027\027\027"
"\027\027\027\027\027\027\027\027\027\000\027\027\027\027\000\004\000\000\000\000\000\135\000\044\103\000\000\377\377\377\377\377\103\377\364\377\364",
2157
}, /* #300 (#3) Andre Maute */
/* 17*/ { 11, BARCODE_AZTEC, -1, -1, 2, -1, -1,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
996
}, /* Padding 11 example causing issue with ZXing-C++ */
/* 18*/ { 0, BARCODE_PDF417, FAST_MODE, -1, -1, -1, -1,
"\060\075\204\060\204\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075"
"\204\060\075\060\103\204\060\214\060\204\060\075\060\031\060\073\060\025\060\075\060\204\060\103\204\060\075\060\204\060\000\075\060\226\060\100\204\060\204\060"
"\204\060\075\204\060\120\214\060\204\060\074\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\000\060\204\060\120\214\060\204\060\074\204"
"\060\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\204\060\204\060\126\060\075\060\204\060\177\060\103\204\060\204\060\377\060\262\060"
"\000\075\060\226\060\100\060\073\060\204\060\000\075\060\226\060\100\060\103\204\060\204\060\075\204\060\204\060\204\041\060\110\060\160\060\075\060\075\204\060"
"\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\073\060\074\060\075"
"\060\204\060\103\204\060\075\060\204\060\204\060\075\204\060\120\214\060\204\060\074\204\060\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041"
"\060\000\060\000\060\200\060\204\060\214\060\204\060\075\060\141\060\000\060\204\060\120\214\060\204\060\075\060\204\060\075\204\060\204\060\204\075\060\075\060"
"\204\060\075\060\075\204\060\075\060\103\204\060\204\060\372\120\060\124\060\000\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060"
"\075\060\073\060\075\060\204\060\103\204\060\075\060\204\060\204\060\122\060\000\060\075\060\000\076\060\100\000\060\075\060\103\204\060\214\060\204\060\075\060"
"\200\060\204\075\060\075\060\204\060\000\075\060\226\060\100\204\060\204\060\075\204\060\204\060\204\075\060\075\060\204\060\134\060\075\204\060\040\060\103\204"
"\060\372\120\060\124\060\004\060\103\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\000\060\113\060\377\060\235\060\075\060"
"\204\060\103\204\060\204\060\075\060\204\060\204\060\075\204\060\075\214\060\204\060\074\204\060\204\060\075\204\060\075\060\103\211\060\214\060\204\060\075\060"
"\041\060\204\060\204\060\120\060\075\060\204\060\003\060\103\204\060\204\060\377\060\350\060\223\060\000\075\060\226\060\103\204\060\204\060\204\120\060\075\060"
"\204\060\000\075\060\226\060\100\060\103\204\060\204\060\075\204\060\204\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120"
"\060\075\060\004\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\031\060\155\060\000\075\060\226\060\100\204\060\204\060"
"\204\060\075\204\060\120\214\060\204\060\074\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\000\060\204\060\120\214\060\204\060\074\204"
"\060\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\204\060\204\060\126\060\075\060\204\060\177\060\103\204\060\204\060\377\060\262\060"
"\000\075\060\226\060\100\204\060\204\060\204\075\060\073\060\204\060\000\075\060\226\060\100\060\103\204\060\204\060\075\204\060\204\060\204\075\060\110\060\160"
"\060\075\060\075\204\060\075\060\103\204\060\204\060\372\120\060\124\060\000\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075"
"\060\073\060\074\060\075\060\204\060\103\204\060\075\060\204\060\204\060\075\204\060\075\214\060\204\060\074\204\060\204\060\075\204\060\075\060\103\214\060\214"
"\060\204\060\075\060\041\060\000\060\000\060\200\060\204\060\214\060\204\060\075\060\141\060\000\060\204\060\075\214\060\204\060\075\060\204\060\075\204\060\204"
"\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075\204\060\075\060\103"
"\204\060\214\060\204\060\075\060\073\060\075\060\204\060\103\204\060\075\060\204\060\204\060\122\060\000\060\075\060\000\076\060\100\000\060\004\060\103\204\060"
"\204\060\003\060\204\075\060\120\214\060\204\060\004\060\103\204\060\204\060\003\060\211\074\060\120\060\124\060\351\060\120\060\075\060\351\060\072\375\060\204\060",
1001
}, /* Original OSS-Fuzz triggering data */
/* 19*/ { 1, BARCODE_PDF417, -1, -1, -1, -1, -1,
"\060\075\204\060\204\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075"
"\204\060\075\060\103\204\060\214\060\204\060\075\060\031\060\073\060\025\060\075\060\204\060\103\204\060\075\060\204\060\000\075\060\226\060\100\204\060\204\060"
"\204\060\075\204\060\120\214\060\204\060\074\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\000\060\204\060\120\214\060\204\060\074\204"
"\060\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\204\060\204\060\126\060\075\060\204\060\177\060\103\204\060\204\060\377\060\262\060"
"\000\075\060\226\060\100\060\073\060\204\060\000\075\060\226\060\100\060\103\204\060\204\060\075\204\060\204\060\204\041\060\110\060\160\060\075\060\075\204\060"
"\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\073\060\074\060\075"
"\060\204\060\103\204\060\075\060\204\060\204\060\075\204\060\120\214\060\204\060\074\204\060\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041"
"\060\000\060\000\060\200\060\204\060\214\060\204\060\075\060\141\060\000\060\204\060\120\214\060\204\060\075\060\204\060\075\204\060\204\060\204\075\060\075\060"
"\204\060\075\060\075\204\060\075\060\103\204\060\204\060\372\120\060\124\060\000\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060"
"\075\060\073\060\075\060\204\060\103\204\060\075\060\204\060\204\060\122\060\000\060\075\060\000\076\060\100\000\060\075\060\103\204\060\214\060\204\060\075\060"
"\200\060\204\075\060\075\060\204\060\000\075\060\226\060\100\204\060\204\060\075\204\060\204\060\204\075\060\075\060\204\060\134\060\075\204\060\040\060\103\204"
"\060\372\120\060\124\060\004\060\103\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\000\060\113\060\377\060\235\060\075\060"
"\204\060\103\204\060\204\060\075\060\204\060\204\060\075\204\060\075\214\060\204\060\074\204\060\204\060\075\204\060\075\060\103\211\060\214\060\204\060\075\060"
"\041\060\204\060\204\060\120\060\075\060\204\060\003\060\103\204\060\204\060\377\060\350\060\223\060\000\075\060\226\060\103\204\060\204\060\204\120\060\075\060"
"\204\060\000\075\060\226\060\100\060\103\204\060\204\060\075\204\060\204\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120"
"\060\075\060\004\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\031\060\155\060\000\075\060\226\060\100\204\060\204\060"
"\204\060\075\204\060\120\214\060\204\060\074\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\000\060\204\060\120\214\060\204\060\074\204"
"\060\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\204\060\204\060\126\060\075\060\204\060\177\060\103\204\060\204\060\377\060\262\060"
"\000\075\060\226\060\100\204\060\204\060\204\075\060\073\060\204\060\000\075\060\226\060\100\060\103\204\060\204\060\075\204\060\204\060\204\075\060\110\060\160"
"\060\075\060\075\204\060\075\060\103\204\060\204\060\372\120\060\124\060\000\060\204\060\074\204\060\204\060\075\204\060\075\060\103\204\060\214\060\204\060\075"
"\060\073\060\074\060\075\060\204\060\103\204\060\075\060\204\060\204\060\075\204\060\075\214\060\204\060\074\204\060\204\060\075\204\060\075\060\103\214\060\214"
"\060\204\060\075\060\041\060\000\060\000\060\200\060\204\060\214\060\204\060\075\060\141\060\000\060\204\060\075\214\060\204\060\075\060\204\060\075\204\060\204"
"\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075\204\060\075\060\103"
"\204\060\214\060\204\060\075\060\073\060\075\060\204\060\103\204\060\075\060\204\060\204\060\122\060\000\060\075\060\000\076\060\100\000\060\004\060\103\204\060"
"\204\060\003\060\204\075\060\120\214\060\204\060\004\060\103\204\060\204\060\003\060\211\074\060\120\060\124\060\351\060\120\060\075\060\351\060\072\375\060\204\060",
1001
}, /* Original OSS-Fuzz triggering data */
/* 20*/ { 28, BARCODE_PDF417COMP, FAST_MODE, -1, 0, -1, -1,
"\000\000\000\377\377\010\002\000\000\033\005\031\000\000\002\000\000\000\000\101\101\101\101\101\101\101\101\000\000\000\000\000\000\000\374\000\101\101\101\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\323\000\000\000\000\000\010\000\000\000\000\165\000\000\000\000\000\000\000\000\000\000\000\000\056"
"\000\000\000\000\000\000\000\000\000\000\100\000\000\101\101\101\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\323\000\000\000\000\000\010\000"
"\000\000\000\000\000\000\000\000\000\000\000\323\000\000\000\000\000\010\000\000\000\000\165\000\000\000\000\000\000\000\000\000\000\000\000\056\000\000\000\000"
"\000\000\000\000\000\000\000\000\101\101\101\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\323\000\010\000\000\000\010\000\000\000\000\165\000"
"\000\000\000\000\000\000\000\000\000\000\000\056\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\375\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\101\101\101\101\101\101\101\101\101\101\101\055\101\101\101\101\101\101\101\101\101"
"\101\101\101\060\151\003\000\000\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\137\101\101\101\101\101\101\101\101\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\101\101\101\101\101\101\101\101\101\101\000\000\000\000\000\000\000\000\000\070\000\000\000\000\000\000\000"
"\000\000\000\377\377\010\002\000\000\033\005\031\000\000\002\000\000\000\000\101\101\101\101\101\101\101\101\000\000\000\000\000\000\000\374\000\101\101\101\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\323\000\000\000\000\000\010\000\000\000\000\165\000\000\000\000\000\000\000\000\000\000\000\000\056"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\375\000\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\375\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\101\101\101\101\101\101\101\101\101\101\101\101\101\055\101\101\101\101\101\101\101\101\101"
"\101\101\101\060\151\003\000\000\101\101\101\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\373\377\377\377\377\060"
"\060\060\060\060\060\060\060\060\060\060\060\051\060\060\060\060\060\060\377\377\377\377\000\000\000\000\377\161\000\151\151\250\122\141\012\377\377\021\021\021"
"\021\021\021\161\021\000\324\324\324\324\324\324\324\324\324\324\324\000\000\000\000\112\000\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324"
"\320\324\324\324\324\021\176\012\000\000\000\000\000\000\324\324\324\324\324\324\324\101\101\101\101\101\101\101\352\352\352\352\352\352\352\352\352\352\352\352"
"\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\352\000"
"\000\000\000\000\101\101\101\101\101\101\101\101\101\101\101\101\101\137\101\101\101\101\101\101\101\101\000\000\000\000\000\000\000\000\000\000\000\000\101\101"
"\101\101\041\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\324\324\324\324\324\324\324\324\324\077\324\324\324\324\324\324\324\324\324\324"
"\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\324\000\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\051\060\060\060\060\060\060\377\377\377\377\000\000\000\000\377\161\000\151\151\250\122\141\012\377\377\021\021\021"
"\021\021\021\161\021\000\324\324\324\324\324\324\324\324\324\324\324\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\101\137\101\101\101\101\101"
"\101\000\000\000\000\374\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\323\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\323\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000",
1048
}, /* #300 (#1) Andre Maute (`pdf_text_submode_length()` not checking if previous/next BYT) */
/* 21*/ { 29, BARCODE_PDF417, FAST_MODE, -1, -1, -1, -1,
"\060\060\060\060\060\060\060\060\060\060\060\162\162\162\162\162\162\162\162\162\162\047\122\162\000\000\167\211\206\001\000\047\153\153\153\153\153\067\066\164"
"\060\060\060\060\060\060\060\060\060\060\060\162\162\162\162\162\162\162\162\162\162\047\122\162\000\000\167\211\206\001\000\047\153\153\153\153\153\153\153\164"
"\164\164\164\164\164\124\164\164\164\164\164\164\164\164\164\164\164\164\164\164\060\060\060\060\060\060\060\060\060\060\060\162\162\162\162\162\162\162\162\162"
"\162\047\122\162\162\162\162\162\162\162\167\167\167\162\162\162\162\047\122\162\000\000\167\167\167\001\152\152\152\152\152\152\051\050\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\107\107\107\107\107\107\107\107"
"\107\107\162\107\107\107\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\152\152\152\152\152"
"\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152"
"\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050"
"\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051"
"\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152"
"\152\152\051\050\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051"
"\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152"
"\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051"
"\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107"
"\107\107\107\107\152\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051"
"\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152"
"\152\152\152\152\152\107\107\107\107\107\152\051\051\051\152\051\050\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\107\107\107\152"
"\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152"
"\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\050\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152"
"\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\107\107\107\152\051"
"\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051"
"\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107"
"\107\107\107\107\152\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\050\152"
"\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152"
"\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\050\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051"
"\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051"
"\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152"
"\152\152\152\152\152\152\152\152\107\107\107\107\107\152\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\000\124\164\164\162\162\162\047\122\162\162"
"\162\162\001\100\167\167\001\044\204\167\167",
2611
}, /* #300 (#7) Andre Maute */
/* 22*/ { 30, BARCODE_PDF417, -1, -1, -1, -1, -1,
"\060\060\060\060\060\060\060\060\060\060\060\162\162\162\162\162\162\162\162\162\162\047\122\162\000\000\167\211\206\001\000\047\153\153\153\153\153\067\066\164"
"\060\060\060\060\060\060\060\060\060\060\060\162\162\162\162\162\162\162\162\162\162\047\122\162\000\000\167\211\206\001\000\047\153\153\153\153\153\153\153\164"
"\164\164\164\164\164\124\164\164\164\164\164\164\164\164\164\164\164\164\164\164\060\060\060\060\060\060\060\060\060\060\060\162\162\162\162\162\162\162\162\162"
"\162\047\122\162\162\162\162\162\162\162\167\167\167\162\162\162\162\047\122\162\000\000\167\167\167\001\152\152\152\152\152\152\051\050\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\107\107\107\107\107\107\107\107"
"\107\107\162\107\107\107\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\152\152\152\152\152"
"\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152"
"\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050"
"\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051"
"\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152"
"\152\152\051\050\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051"
"\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152"
"\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051"
"\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107"
"\107\107\107\107\152\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051"
"\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152"
"\152\152\152\152\152\107\107\107\107\107\152\051\051\051\152\051\050\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\107\107\107\152"
"\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152"
"\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\050\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152"
"\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\107\107\107\152\051"
"\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051"
"\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107"
"\107\107\107\107\152\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\051\051\051\050\152"
"\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152"
"\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\050\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051"
"\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051"
"\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152"
"\152\152\152\152\152\152\152\152\107\107\107\107\107\152\051\051\051\051\107\107\107\107\107\107\107\107\107\107\107\051\051\051\051\051\051\050\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\051\152\152\152\152\152\152\152\152\152\152\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051"
"\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\051\051\050\152\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\152\152\051\051\051\051\051\051\051\051\051"
"\051\051\051\051\107\107\051\051\051\051\051\051\051\051\051\051\051\051\050\051\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051"
"\051\051\050\152\152\152\152\152\152\152\152\051\050\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\051\000\124\164\164\162\162\162\047\122\162\162"
"\162\162\001\100\167\167\001\044\204\167\167",
2611
}, /* #300 (#7) Andre Maute !FAST_MODE */
/* 23*/ { 31, BARCODE_PDF417, FAST_MODE, -1, -1, 0 /*same effect as 242*/, -1,
"\000\000\000\000\000\000\000\000\000\000\000\212\377\000\000\153\153\153\153\153\153\153\060\047\047\043\047\057\153\000\153\153\137\377\153\153\000\134\000\000"
"\000\153\153\343\153\153\153\060\047\047\043\047\057\157\153\153\153\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\377\377\377\167"
"\001\100\000\377\004\002\000\000\000\000\000\001\000\000\134\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162"
"\077\162\072\176\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\364\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362"
"\134\162\162\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077"
"\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\377\134\134\126\142\134"
"\162\362\162\162\162\072\176\000\162\134\134\126\142\134\162\362\162\162\162\072\176\000\162\162\162\162\162\174\174\377\134\362\162\362\162\162\162\072\176\000"
"\162\362\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\000\044\162\162\162\162\174\174\377\134\362\162\162\162\134\134\134\142\162"
"\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000"
"\162\162\377\377\377\377\377\377\134\134\134\142\134\162\153\153\153\153\153\153\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134"
"\134\134\142\134\162\362\162\162\162\072\176\000\162\000\001\000\000\134\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162"
"\162\162\162\077\162\072\176\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\364\072\176\000\162\162\162\162\162\174\174\377\134\134\134"
"\162\142\362\134\162\162\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162"
"\162\162\077\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\162\162\072"
"\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\377\134\134\126\142\134\162\362\162\162\162\072\176\000\174\174\377\134\362\162\362\162\162\162"
"\072\176\000\162\362\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\162\362\162\162\162\134\134\134\142\134\162\162\162\162\077\173"
"\153\153\153\165\000\000\000\153\151\153\153\153\153\153\153\153\153\153\153\153\153\153\153\176\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362"
"\162\162\162\072\176\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362"
"\162\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\377\134\134\134\167\167\167\167\167\001\100\000\002\000\000\000\000\000\000\000"
"\000\153\153\067\000\000\000\153\153\300\000\000\000\000\000\000\000\000\000\000\000\000\212\377\000\000\153\153\153\153\153\153\153\060\047\047\043\047\057\153"
"\000\153\153\137\377\153\153\000\134\000\000\000\153\153\343\153\153\153\060\047\047\043\047\057\157\153\153\153\162\162\077\162\072\176\000\162\134\142\134\162"
"\162\162\162\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\377\377\377\167\001\100\000\377\004\002\000\000\000\000"
"\000\001\000\000\134\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\362\377\377\377"
"\377\377\377\134\134\134\142\134\162\362\162\162\364\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\215\215\162"
"\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377"
"\377\377\134\134\134\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\377\134\134\126\142\134\162\362\162\162\162\072\176\000\162\162"
"\162\162\162\174\174\377\134\362\162\362\162\162\162\072\176\000\162\362\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\000\044\162"
"\162\162\162\174\174\377\134\362\162\162\162\134\134\134\142\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377"
"\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\153\153\153\153\153\153\142\134\162\162"
"\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\000\001\000\000\134\077\162\072\176\000\162"
"\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162"
"\162\364\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162"
"\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\162\162\072\176\000\162"
"\162\162\162\162\174\174\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\162\162\162\162\174\174\377\134\362\162\172\162\134\134\134\142\162\072\162"
"\162\162\162\174\174\377\134\362\162\362\162\162\162\072\176\000\162\362\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\000\044\162"
"\162\162\162\174\174\377\134\362\162\162\162\134\134\134\142\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377"
"\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\153\153\153\153\153\153\142\134\162\162"
"\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\000\001\000\000\134\077\162\072\176\000\162"
"\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162"
"\162\364\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162"
"\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072"
"\176\000\162\162\377\377\377\377\377\377\134\134\134\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\377\134\134\126\142\134\162\362"
"\162\162\162\072\176\000\174\174\377\134\362\162\362\162\162\162\072\176\000\162\362\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000"
"\162\362\162\162\162\134\134\134\142\134\162\162\162\162\077\173\153\153\153\165\000\000\000\153\151\153\153\153\153\153\153\153\153\153\153\153\153\153\153\176"
"\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\162\072\176\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176"
"\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\377\134\134\134"
"\167\167\167\167\167\001\100\000\002\000\000\000\000\000\000\000\000\153\153\067\000\000\000\153\153\300\000\000\000\000\000\000\000\000\000\000\000\000\212\377"
"\000\000\153\153\153\153\153\153\153\060\047\047\043\047\057\153\000\153\153\137\377\153\153\000\134\000\000\000\153\153\343\153\153\153\060\047\047\043\047\057"
"\157\153\153\153\162\162\077\162\072\176\000\162\134\142\134\162\162\162\162\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134"
"\162\162\377\377\377\167\001\100\000\377\004\002\000\000\000\000\000\001\000\000\134\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134"
"\142\134\162\162\162\162\077\162\072\176\000\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\364\072\176\000\162\162\162\162\162\174\174\377"
"\134\134\134\162\142\362\134\162\162\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142"
"\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362"
"\377\134\134\126\142\134\162\362\162\162\162\072\176\000\162\162\162\162\162\174\174\377\134\362\162\362\162\162\162\072\176\000\162\362\162\162\162\174\174\377"
"\134\134\134\162\142\362\134\162\162\162\072\176\000\000\044\162\162\162\162\174\174\377\134\362\162\162\162\134\134\134\142\162\072\176\000\215\215\162\162\162"
"\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377"
"\134\134\134\142\134\162\153\153\153\153\153\153\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162"
"\162\072\176\000\162\000\001\000\000\134\077\162\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000"
"\162\362\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\364\072\176\000\162\162\162\162\162\174\174\377\134\134\134\162\142\362\134\162\162\162\072"
"\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162"
"\162\377\377\377\377\377\377\134\134\134\162\162\072\176\000\162\162\162\162\162\174\174\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\162\162\162"
"\162\174\174\377\134\362\162\172\162\134\134\134\142\162\072\176\000\215\215\162\162\162\174\174\174\171\072\176\000\162\162\162\162\162\162\377\053\377\377\377"
"\134\134\134\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\362\162\162\162"
"\174\174\377\134\134\134\162\142\362\134\162\162\162\072\176\000\162\362\162\162\162\134\134\142\134\162\362\162\162\162\072\176\000\044\162\162\162\162\174\174"
"\377\134\362\162\162\162\134\134\134\142\162\072\176\000\215\215\162\162\162\174\174\174\174\072\176\000\162\162\162\162\162\162\377\053\377\377\377\134\134\134"
"\142\134\162\162\162\162\077\162\072\176\000\162\162\377\377\377\377\377\377\134\134\134\142\134\162\362\162\162\162\072\176\000\162\162\162\162\162\174\174\377"
"\134\134\134\162\142\362\134\162\162\162\072\176\000\215\215\162\162\162\174\174\174\174\134\134\134\142\134\000\153\153\153\153\153\153\153\062\047\047\043\047"
"\057\262\054\377\134\134\142\153\330\153",
2690
}, /* #300 (#10) Andre Maute */
/* 24*/ { 1, BARCODE_QRCODE, -1, -1, -1, -1, ZINT_FULL_MULTIBYTE, "\215\215\350\2156750\215\215\215\215\215\215\000\000\000\025\215\215\215\215\215\232\215\232\232\001\361\215\215\215\215\215\221\215\215\215\215JJJJJJNJJJJJJ\215\215\215\2159999\215\215\215\215\215\215\215\215\215\235\215\215\215\215\215\035\004\000\000@\000\000\000\000\375\000\000\000\000\000\000\000\000\000\000\000\000\000\241\000\000\000\000\000\000\000\241\247^^^\377\377\377\000 \000\000\000\000\000\000\377\377u\000\000\000\000\000\000\000^\377\377^^\000:\000\177\377\377\377?\377\377\377\377\377\377\377\377\377\377\377\377\377\377\241\241\232\232\232\232\232\232\232\232\000\377\377\377\242\003\000\000\377\377/\000AA\000\000\000\000\000\000\000\000\000\000\000\000T\000\000\000\000\000\000\000\000WWW\237\250WWWWWW\377\377R30 \377\377\000\000\000", 231 }, /* #300 (#15), Andre Maute */
/* 25*/ { 2, BARCODE_QRCODE, -1, 35, -1, -1, ZINT_FULL_MULTIBYTE, "\215\215\215\215\215\350\215\215999\215\21500000\215\215\215\215\215\215\377O\000\000\036\000\000\000\000\357\376\026\377\377\377\377\241\241\232\232\232\232\232\232\235\032@\374:JGB \000\000@d\000\000\000\241\241\000\000\027\002\241\241\000\000\014\000\000\000\000\357\327\004\000\000\000\000\000\000\000\375\000\000\000\000\000\000\000\000\000\000\000\000\0000253]9R4R44,44,4404[255\350999\215\21599999\215\215\215\2150000\215\215\215\215\215\215\215\215\215]9444442<4444,4044%44vA\000\000\002\000'\000\000\215\377@\215\215\350\215\215\215\215\215\215\215\307\306\306n\215\215\000\000\001\000\000\203\000\000\000\000\000\000@\215\215\215[\2154315@]R0", 229 }, /* #300 (#16), Andre Maute */
/* 26*/ { 0, BARCODE_AUSROUTE, -1, -1, -1, -1, -1, "A\000\000\000", 4 }, /* #181 Christian Hartlage OSS-Fuzz */
/* 27*/ { 1, BARCODE_AUSROUTE, -1, -1, -1, -1, -1, "1\000\000\000", 4 }, /* #181 Christian Hartlage OSS-Fuzz */
/* 28*/ { 0, BARCODE_EANX, -1, -1, -1, -1, -1, "55++15", -1, }, /* #181 Christian Hartlage OSS-Fuzz */
/* 29*/ { 1, BARCODE_EANX, -1, -1, -1, -1, -1, "+123456789012345678", -1, }, /* #181 Christian Hartlage OSS-Fuzz */
/* 30*/ { 8, BARCODE_EANX, -1, -1, -1, -1, -1, "+12345", -1, }, /* #181 Christian Hartlage OSS-Fuzz */
/* 31*/ { 9, BARCODE_EANX, -1, -1, -1, -1, -1, "+123456", -1, }, /* #181 Christian Hartlage OSS-Fuzz */
/* 32*/ { 10, BARCODE_EANX, -1, -1, -1, -1, -1, "000002000000200+203", -1 }, /* #218 Jan Schrewe CI-Fuzz */
/* 33*/ { 0, BARCODE_DOTCODE, -1, -1, -1, -1, -1, "(\207'", -1 }, /* #181 Christian Hartlage / Nico Gunkel OSS-Fuzz */
/* 34*/ { 1, BARCODE_DOTCODE, -1, -1, -1, -1, -1,
"\133\061\106\133\061\106\070\161\116\133\116\116\067\040\116\016\000\116\125\111\125\125\316\125\125\116\116\116\116\117\116\125"
"\111\125\103\316\125\125\116\116\116\116\117\000\000\116\136\116\116\001\116\316\076\116\116\057\136\116\116\134\000\000\116\116"
"\116\230\116\116\116\116\125\125\125\257\257\257\000\001\116\130\212\212\212\212\212\212\212\377\377\210\212\212\177\000\212\212"
"\212\212\212\212\175\212\212\212\212\212\212\116\117\001\116\116\112\116\116\116\116\176\136\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\005\377\377\005\125\125\125\325\001\116\116\116\266\116\020\000\200\000\116\116\177\000\000\377"
"\377\257\257\257\125\112\117\116\001\000\000\044\241\001\116\116\116\136\116\116\116\056\116\125\111\125\125\316\125\125\116\116"
"\116\116\057\000\000\116\136\116\116\001\116\116\076\342\116\057\136\116\116\134\000\000\116\116\116\241\116\116\116\116\125\125"
"\125\257\257\257\000\001\116\130\212\212\212\212\212\212\212\212\172\212\071\071\071\071\071\071\071\071\071\071\071\071\071\071"
"\071\071\071\071\071\110\071\071\051\071\065\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071"
"\071\071\071\071\071\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330\330"
"\330\330\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\071\065\071\071\071\071\071\071\071\071\071\071\071\071\071"
"\071\071\071\071\071\072\071\071\277\071\071\077\071\071\071\071\071\071\071\071\154\071\071\071\071\071\071\071\071\071\071\071"
"\071\071\071\011\071\071\071\071\071\071\071\071\071\071\071\071\071\071\105\105\105\105\105\105\105\105\105\105\105\105\105\071"
"\071\071\071\071\071",
421
}, /* Original OSS-Fuzz triggering data for index out of bounds (encoding of HT/FS/GS/RS when shifting to code set B) */
/* 35*/ { 2, BARCODE_DOTCODE, -1, -1, -1, -1, -1, "\233:", -1 }, /* Original OSS-Fuzz triggering data for codeword_array buffer overflow, L777 */
/* 36*/ { 3, BARCODE_DOTCODE, -1, -1, -1, -1, -1, "\241\034", -1 }, /* As above L793 */
/* 37*/ { 4, BARCODE_DOTCODE, -1, -1, -1, -1, -1, "\270\036", -1 }, /* As above L799 */
/* 38*/ { 5, BARCODE_DOTCODE, -1, -1, -1, -1, -1, "\237\032", -1 }, /* As above L904 */
/* 39*/ { 6, BARCODE_DOTCODE, -1, -1, -1, -1, -1, "\237", -1 }, /* As above L1090 */
/* 40*/ { 0, BARCODE_MAXICODE, -1, -1, -1, -1, -1, "\223\223\223\223\223\200\000\060\060\020\122\104\060\343\000\000\040\104\104\104\104\177\377\040\000\324\336\000\000\000\000\104\060\060\060\060\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\104\060\104\104\000\000\000\040\104\104\104\104\177\377\377\377\324\336\000\000\000\000\104\377\104\001\104\104\104\104\104\104\233\233\060\060\060\060\060\060\060\060\060\325\074", 107 }, /* #181 Nico Gunkel OSS-Fuzz - original OSS-Fuzz triggering data */
/* 41*/ { 1, BARCODE_MAXICODE, -1, -1, -1, -1, -1, "AaAaAaAaAaAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA123456789", -1 }, /* Add 6 lowercase a's so 6 SHIFTS inserted so 6 + 138 (max input len) = 144 and numbers come at end of buffer */
};
/* GS1_MODE data */
static const struct item gs1_data[] = {
/* 0*/ { 0, BARCODE_QRCODE, GS1_MODE | GS1NOCHECK_MODE, -1, -1, -1, -1, "[]CCCCCLLLLLLLLLLLLLLLLLLLLLCCCCCCCC@CCCCCCCCCCCCCCCCCCCCCCC%%C%C%%%%%%%%%%%%%%LLLCCCCCCCC%%C%C%%%%%%%%%%%%%%LLLLLLLLLLLLLLLLLLL000000032861710*383556LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL155816162LLLLLCC%%C%C%%%%%%%%%%%%%%LLLCCCCCCCC%%C%C%%%%%%%%%%%%%%LLLLLLLLLL)!1661055777[723]T5", -1 }, /* #300 (#14), Andre Maute */
/* 1*/ { 5, BARCODE_EANX_CC, GS1_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, -1, -1, -1, "()111%", -1 }, /* #300 (#5), Andre Maute (`dbar_date()` not checking length + other non-checks) */
/* 2*/ { 6, BARCODE_UPCA_CC, GS1_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, -1, -1, -1, "()90", -1, }, /* #300 (#6), Andre Maute (`dbar_date()` not checking length + other non-checks) */
/* 3*/ { 7, BARCODE_UPCA_CC, GS1_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, -1, -1, -1, "()904OOOOO)CK0336680OOOOOOOOOOOOOO29[0kkkk%%%%(", -1 }, /* #300 (#11), Andre Maute (`gs1_verify()` not checking length on resolve AI data loop) */
/* 4*/ { 8, BARCODE_GS1_128_CC, GS1_MODE | GS1NOCHECK_MODE, -1, 3, -1, -1, "[]RRR___________________KKKRRR0000", -1 }, /* #300 (#13), Andre Maute (`calc_padding_ccc()` dividing by zero when linear width == 68) */
};
/* Write a setting as 1 char to filename, allowing for -1 meaning none (255 or zero) */
static void write_setting(const char *const filename, const int setting, const unsigned char none, FILE *fp) {
unsigned char ch = setting == -1 ? none : (unsigned char) setting;
size_t ret = fwrite(&ch, sizeof(unsigned char), 1, fp);
if (ret != 1) {
fprintf(stderr, "fwrite(%s) failed ret %d != 1 (%d: %s)\n", filename, (int) ret, errno, strerror(errno));
assert(0);
}
}
/* Creates directory `dirname` if not already existing, and writes each `item` of `data` to files named
"dirname/NNNN_BARCODE_NAME" */
static void write_corp(const char dirname[], const struct item data[], const int data_size, const int no_eci) {
struct stat st;
int i;
char filename[2048];
FILE *fp;
if (mkdir(dirname, S_IRWXU) != 0 && errno != EEXIST) {
fprintf(stderr, "mkdir(%s) failed (%d: %s)\n", dirname, errno, strerror(errno));
assert(0);
}
if (stat(dirname, &st) != 0 || !S_ISDIR(st.st_mode)) {
fprintf(stderr, "%s not directory\n", dirname);
assert(0);
}
for (i = 0; i < data_size; i++) {
const size_t length = data[i].length == -1 ? strlen(data[i].data) : data[i].length;
char name[32] = {0};
const struct settings_item *si;
size_t ret;
char ch;
if (ZBarcode_BarcodeName(data[i].symbology, name) != 0) {
assert(0);
}
sprintf(filename, "%s/%04d-%02d_%s", dirname, i, data[i].test_fuzz_idx, name + 8); /* Lose "BARCODE_" */
fp = fopen(filename, "w+");
if (!fp) {
fprintf(stderr, "fopen(%s, w+) failed (%d: %s)\n", filename, errno, strerror(errno));
assert(fp);
}
assert(data[i].symbology >= 0 && data[i].symbology < ZARRAY_SIZE(settings));
si = settings + data[i].symbology;
if (data[i].input_mode != -1) {
/* Shift out DATA/UNICODE/GS1_MODE (shifted back in `set_symbol()` in "fuzz.h") */
write_setting(filename, data[i].input_mode >> 3, 0, fp);
} else {
write_setting(filename, data[i].input_mode, 0, fp);
}
if (si->option_1_min <= si->option_1_max) {
write_setting(filename, data[i].option_1, 0xFF, fp);
}
if (si->option_2_min <= si->option_2_max) {
write_setting(filename, data[i].option_2, 0, fp);
}
if (!no_eci && (ZBarcode_Cap(data[i].symbology, ZINT_CAP_ECI) & ZINT_CAP_ECI)) {
write_setting(filename, data[i].eci, 0, fp);
}
if (si->option_3) {
write_setting(filename, data[i].option_3 != -1, 0, fp);
}
ret = fwrite(data[i].data, sizeof(char), length, fp);
if (ret != length) {
fprintf(stderr, "fwrite(%s) failed ret %d != length %d (%d: %s)\n",
filename, (int) ret, (int) length, errno, strerror(errno));
assert(0);
}
fclose(fp);
}
}
/* Write out DATA_MODE files and GS1_MODE files separately, in directories "fuzz_data_corpus" and "fuzz_gs1_corpus" */
int main(int argc, char **argv) {
(void)argc; (void)argv;
write_corp("fuzz_data_corpus", data_data, ZARRAY_SIZE(data_data), 0 /*no_eci*/);
write_corp("fuzz_gs1_corpus", gs1_data, ZARRAY_SIZE(gs1_data), 1 /*no_eci*/);
return 0;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* vim: set ts=4 sw=4 et : */

View file

@ -0,0 +1,13 @@
homepage: "https://zint.org.uk"
language: c
primary_contact: "burmartke@gmail.com"
main_repo: "https://github.com/zint/zint"
file_github_issue: true
sanitizers:
- address
- memory:
experimental: True
- undefined
architectures:
- x86_64
- i386

View file

@ -1,6 +1,6 @@
/*
libzint - the open source barcode library
Copyright (C) 2020-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2020-2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -2942,16 +2942,16 @@ static void test_fuzz(const testCtx *const p_ctx) {
struct item {
int symbology;
char *data;
int length;
int input_mode;
int option_1;
int option_2;
char *data;
int length;
int ret;
};
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
struct item data[] = {
/* 0*/ { BARCODE_AZTEC,
/* 0*/ { BARCODE_AZTEC, DATA_MODE, -1, -1,
"\133\060\060\060\135\060\125\125\125\125\140\060\125\125\125\125\060\060\060\271\060\060\125\103\164\125\125\125\377\377\125\125"
"\125\125\125\125\125\133\060\076\060\135\261\177\261\261\261\236\261\261\261\040\261\261\261\261\261\261\261\020\261\261\261\261"
"\261\261\265\261\261\261\261\261\261\261\261\261\261\261\261\040\224\261\261\261\261\261\000\000\004\000\031\060\031\031\031\031"
@ -3023,9 +3023,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\261\261\261\261\261\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\135\135\135\135\135\135"
"\135\335\135\060\060\010\010\010\010\010\060",
2251, DATA_MODE, -1, -1, ZINT_ERROR_TOO_LONG
2251, ZINT_ERROR_TOO_LONG
}, /* Original OSS-Fuzz triggering data for malloc leak */
/* 1*/ { BARCODE_AZTEC,
/* 1*/ { BARCODE_AZTEC, DATA_MODE, -1, -1,
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\000\060\060\060\060\000\060\060\000\060\060\060\060"
"\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060\060"
@ -3114,9 +3114,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\060\060\060\363\060\060\060\060\060\060\060\060\060\060\060\060\362\060\060\060\060\060\000\060\060\377\060\060\060\175\175\175"
"\175\060\060\060\175\175\175\175\060\060\005\060\005\060\005\060\060\060\060\000\000\060\060\060\060\060\060\377\060\060\060\060"
"\377\060\377\377\060\060\057\060\060\057\060\060\060\000\000\060\060",
2801, DATA_MODE, -1, -1, ZINT_ERROR_TOO_LONG
2801, ZINT_ERROR_TOO_LONG
}, /* Original OSS-Fuzz triggering data for binary_string buffer overrun */
/* 2*/ { BARCODE_AZTEC,
/* 2*/ { BARCODE_AZTEC, -1, 1, -1,
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
@ -3150,9 +3150,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123",
4483, -1, 1, -1, 0
4483, 0
}, /* 4483 = (1664 (Max codewords) - 169 (ECC codewords) - 5/12 (D/L) - 3/12 (padding)) * 3 (3 4-bit digits per 12-bit wordcode) = 4483 */
/* 3*/ { BARCODE_AZTEC,
/* 3*/ { BARCODE_AZTEC, -1, 1, -1,
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
@ -3186,9 +3186,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123",
4484, -1, 1, -1, ZINT_ERROR_TOO_LONG
4484, ZINT_ERROR_TOO_LONG
},
/* 4*/ { BARCODE_AZTEC,
/* 4*/ { BARCODE_AZTEC, -1, 1, -1,
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
@ -3217,9 +3217,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY",
3587, -1, 1, -1, 0
3587, 0
},
/* 5*/ { BARCODE_AZTEC,
/* 5*/ { BARCODE_AZTEC, -1, 1, -1,
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
@ -3248,9 +3248,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",
3588, -1, 1, -1, ZINT_ERROR_TOO_LONG
3588, ZINT_ERROR_TOO_LONG
},
/* 6*/ { BARCODE_AZTEC,
/* 6*/ { BARCODE_AZTEC, -1, 1, -1,
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
@ -3307,9 +3307,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240",
2237, -1, 1, -1, 0
2237, 0
},
/* 7*/ { BARCODE_AZTEC,
/* 7*/ { BARCODE_AZTEC, -1, 1, -1,
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
@ -3366,9 +3366,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240"
"\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240",
2238, -1, 1, -1, ZINT_ERROR_TOO_LONG
2238, ZINT_ERROR_TOO_LONG
},
/* 8*/ { BARCODE_AZTEC,
/* 8*/ { BARCODE_AZTEC, DATA_MODE, -1, 1,
"\105\105\000\000\000\000\000\000\000\000\077\012\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\350\350\001\000\000\000\000\000"
"\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\002\222\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\077\012"
"\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\000\000\000\000\000\000\000\033\000\036\103\012\072\103\103\000\100\116\000\000"
@ -3424,9 +3424,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\000\177\377\377\377"
"\046\000\000\000\000\000\000\027\027\027\027\027\027\027\027\027\027\027\027\000\027\027\027\027\000\004\000\000\000\000\000\135\000\044\103\000\000\377\377\377"
"\377\377\103\377\364\377\364",
2167, DATA_MODE, -1, 1, ZINT_ERROR_TOO_LONG
2167, ZINT_ERROR_TOO_LONG
}, /* #300 (#2) Andre Maute */
/* 9*/ { BARCODE_AZTEC,
/* 9*/ { BARCODE_AZTEC, DATA_MODE, 1, -1,
"111\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
@ -3480,9 +3480,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
"111",
2054, DATA_MODE, 1, -1, 0
2054, 0
}, /* 2048 byte block surrounded by digits */
/* 10*/ { BARCODE_AZTEC,
/* 10*/ { BARCODE_AZTEC, DATA_MODE, -1, 1,
"\105\105\000\000\000\000\000\000\000\000\077\012\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\350\350\001\000\000\000\000\000"
"\000\036\103\012\072\103\103\000\100\116\000\000\000\000\000\000\000\000\000\000\002\222\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\077\012"
"\377\377\377\072\376\376\350\350\350\350\350\250\350\350\350\350\354\350\350\350\000\000\000\000\000\000\000\033\000\036\103\012\072\103\103\000\100\116\000\000"
@ -3537,9 +3537,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\000\177\377\377\377\046\000\000\000\000\000\000\027\027\027"
"\027\027\027\027\027\027\027\027\027\000\027\027\027\027\000\004\000\000\000\000\000\135\000\044\103\000\000\377\377\377\377\377\103\377\364\377\364",
2157, DATA_MODE, -1, 1, ZINT_ERROR_TOO_LONG
2157, ZINT_ERROR_TOO_LONG
}, /* #300 (#3) Andre Maute */
/* 11*/ { BARCODE_AZTEC,
/* 11*/ { BARCODE_AZTEC, DATA_MODE, 2, -1,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
@ -3565,7 +3565,7 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
996, DATA_MODE, 2, -1, 0
996, 0
}, /* Padding 11 example causing issue with ZXing-C++ */
};
int data_size = ARRAY_SIZE(data);

View file

@ -1,6 +1,6 @@
/*
libzint - the open source barcode library
Copyright (C) 2019-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2019-2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -1561,15 +1561,15 @@ static void test_fuzz(const testCtx *const p_ctx) {
int debug = p_ctx->debug;
struct item {
int input_mode;
char *data;
int length;
int input_mode;
int ret;
};
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
struct item data[] = {
/* 0*/ { "(\207'", -1, DATA_MODE, 0 }, /* 0x28,0x87,0x27 Note: should but doesn't trigger sanitize error if no length check, for some reason; UPDATE: use up-to-date gcc (9)! */
/* 1*/ {
/* 0*/ { DATA_MODE, "(\207'", -1, 0 }, /* 0x28,0x87,0x27 Note: should but doesn't trigger sanitize error if no length check, for some reason; UPDATE: use up-to-date gcc (9)! */
/* 1*/ { DATA_MODE,
"\133\061\106\133\061\106\070\161\116\133\116\116\067\040\116\016\000\116\125\111\125\125\316\125\125\116\116\116\116\117\116\125"
"\111\125\103\316\125\125\116\116\116\116\117\000\000\116\136\116\116\001\116\316\076\116\116\057\136\116\116\134\000\000\116\116"
"\116\230\116\116\116\116\125\125\125\257\257\257\000\001\116\130\212\212\212\212\212\212\212\377\377\210\212\212\177\000\212\212"
@ -1584,12 +1584,12 @@ static void test_fuzz(const testCtx *const p_ctx) {
"\071\071\071\071\071\072\071\071\277\071\071\077\071\071\071\071\071\071\071\071\154\071\071\071\071\071\071\071\071\071\071\071"
"\071\071\071\011\071\071\071\071\071\071\071\071\071\071\071\071\071\071\105\105\105\105\105\105\105\105\105\105\105\105\105\071"
"\071\071\071\071\071", /* Original OSS-Fuzz triggering data for index out of bounds (encoding of HT/FS/GS/RS when shifting to code set B) */
421, DATA_MODE, 0 },
/* 2*/ { "\233:", -1, DATA_MODE, 0 }, /* Original OSS-Fuzz triggering data for codeword_array buffer overflow, L777 */
/* 3*/ { "\241\034", -1, DATA_MODE, 0 }, /* As above L793 */
/* 4*/ { "\270\036", -1, DATA_MODE, 0 }, /* As above L799 */
/* 5*/ { "\237\032", -1, DATA_MODE, 0 }, /* As above L904 */
/* 6*/ { "\237", -1, DATA_MODE, 0 }, /* As above L1090 */
421, 0 },
/* 2*/ { DATA_MODE, "\233:", -1, 0 }, /* Original OSS-Fuzz triggering data for codeword_array buffer overflow, L777 */
/* 3*/ { DATA_MODE, "\241\034", -1, 0 }, /* As above L793 */
/* 4*/ { DATA_MODE, "\270\036", -1, 0 }, /* As above L799 */
/* 5*/ { DATA_MODE, "\237\032", -1, 0 }, /* As above L904 */
/* 6*/ { DATA_MODE, "\237", -1, 0 }, /* As above L1090 */
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;

View file

@ -1,6 +1,6 @@
/*
libzint - the open source barcode library
Copyright (C) 2019-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2019-2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -142,12 +142,12 @@ static void test_options(const testCtx *const p_ctx) {
/* 7*/ { BARCODE_PDF417, 7, 2, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 87, 120, "Warning 748: Columns increased from 2 to 3", -1 }, /* ECC 7, cols 2 auto-upped to 3 but now with warning */
/* 8*/ { BARCODE_PDF417, 7, 2, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, 0, 87, 120, "Error 748: Columns increased from 2 to 3", -1 },
/* 9*/ { BARCODE_PDF417, -1, 10, -1, 0, { 0, 0, "" }, "12345", 0, 0, 3, 239, "", -1 }, /* ECC auto-set to 2, cols 10 */
/* 10*/ { BARCODE_PDF417, 9, -1, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 6, 103, "Warning 460: Security value out of range", -1 }, /* Invalid ECC, auto-set */
/* 11*/ { BARCODE_PDF417, -1, 31, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 6, 103, "Warning 461: Number of columns out of range (1 to 30)", 0 }, /* Invalid cols, auto-set */
/* 10*/ { BARCODE_PDF417, 9, -1, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 6, 103, "Warning 460: Security value out of range (0 to 8), ignored", -1 }, /* Invalid ECC, auto-set */
/* 11*/ { BARCODE_PDF417, -1, 31, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 6, 103, "Warning 461: Number of columns out of range (1 to 30), ignored", 0 }, /* Invalid cols, auto-set */
/* 12*/ { BARCODE_PDF417, -1, -1, 2, 0, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, ZINT_ERROR_INVALID_OPTION, 0, 0, "Error 466: Number of rows out of range (3 to 90)", -1 }, /* Invalid rows, error */
/* 13*/ { BARCODE_PDF417, -1, -1, 91, 0, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, ZINT_ERROR_INVALID_OPTION, 0, 0, "Error 466: Number of rows out of range (3 to 90)", -1 }, /* Invalid rows, error */
/* 14*/ { BARCODE_PDF417, 9, -1, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, 0, 0, "Error 460: Security value out of range", -1 }, /* Invalid ECC */
/* 15*/ { BARCODE_PDF417, -1, 31, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, 0, 0, "Error 461: Number of columns out of range (1 to 30)", -1 }, /* Invalid cols */
/* 14*/ { BARCODE_PDF417, 9, -1, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, 0, 0, "Error 462: Security value out of range (0 to 8)", -1 }, /* Invalid ECC */
/* 15*/ { BARCODE_PDF417, -1, 31, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, 0, 0, "Error 473: Number of columns out of range (1 to 30)", -1 }, /* Invalid cols */
/* 16*/ { BARCODE_PDF417, -1, 30, 31, 0, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, 0, 0, "Error 475: Columns x rows out of range (1 to 928)", -1 }, /* Rows * cols (930) > 928 */
/* 17*/ { BARCODE_PDF417, -1, 1, -1, 0, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI", ZINT_WARN_INVALID_OPTION, 0, 65, 120, "Warning 748: Columns increased from 1 to 3", -1 }, /* Cols 1 too small, used to fail, now auto-upped to 3 with warning */
/* 18*/ { BARCODE_PDF417, -1, -1, 4, 0, { 0, 0, "" }, "12345", 0, 0, 4, 120, "", -1 }, /* Specify rows 4 (cols 3) */