diff options
| -rw-r--r-- | src/lib/string.c | 4 | ||||
| -rw-r--r-- | tests/aplwc_utf8.c | 4 | ||||
| -rw-r--r-- | tests/fuzz-crashes/2.fuzz | bin | 26 -> 0 bytes | |||
| -rw-r--r-- | tests/fuzz-crashes/3.fuzz | 5 | ||||
| -rw-r--r-- | tests/fuzz-crashes/4.fuzz | 4 | ||||
| -rw-r--r-- | tests/fuzz-crashes/5.fuzz | bin | 38 -> 0 bytes | |||
| -rw-r--r-- | tests/fuzz-crashes/Makefile.am | 1 | ||||
| -rwxr-xr-x | tools/check | 4 |
8 files changed, 7 insertions, 15 deletions
diff --git a/src/lib/string.c b/src/lib/string.c index 0c01fca..469ef26 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -66,7 +66,7 @@ invalid: charcount++; switch(seqlen){ case 0: - if(NEVER(c == 0) || NEVER(c > 0x7F)) + if(NEVER(c > 0x7F)) goto invalid; break; case 1: @@ -78,7 +78,7 @@ invalid: goto invalid; break; case 3: - if((c < 0x010000) || NEVER(c > 0x10FFFF)) + if((c < 0x010000) || (c > 0x10FFFF)) goto invalid; break; } diff --git a/tests/aplwc_utf8.c b/tests/aplwc_utf8.c index 44dd85a..7d14778 100644 --- a/tests/aplwc_utf8.c +++ b/tests/aplwc_utf8.c @@ -28,6 +28,7 @@ uint8_t bad4[] = {0xc0,0x40,0}; uint8_t bad5[] = {0xe0,0x80,0x80,0}; uint8_t bad6[] = {0xc0,0}; uint8_t bad7[] = {0xF0,0x80,0x80,0x80,0}; +uint8_t bad8[] = {0xF7,0xBF,0xBF,0xBF,0}; uint8_t good1[] = {0x61,0x70,0x6c,0x77,0x63,0}; uint8_t good2[] = {0x41,0xe2,0x89,0xa2,0xce,0x91,0x2e,0}; @@ -65,7 +66,8 @@ main(void) bad4, bad5, bad6, - bad7 + bad7, + bad8 }; uint8_t *good_tests[] = { diff --git a/tests/fuzz-crashes/2.fuzz b/tests/fuzz-crashes/2.fuzz Binary files differdeleted file mode 100644 index bd8af68..0000000 --- a/tests/fuzz-crashes/2.fuzz +++ /dev/null diff --git a/tests/fuzz-crashes/3.fuzz b/tests/fuzz-crashes/3.fuzz deleted file mode 100644 index ed1bb89..0000000 --- a/tests/fuzz-crashes/3.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#0000%00000000 - -:m::00=00 :::::::::0::!<00= - -:m80ø÷¥ˆ‡ diff --git a/tests/fuzz-crashes/4.fuzz b/tests/fuzz-crashes/4.fuzz deleted file mode 100644 index 0ad1632..0000000 --- a/tests/fuzz-crashes/4.fuzz +++ /dev/null @@ -1,4 +0,0 @@ -#!000000000000H0 - -:exmbol ylu'''000000ñ±±±ñ±±±/00000ñ±±±÷±¶±' ->?>'s 00 diff --git a/tests/fuzz-crashes/5.fuzz b/tests/fuzz-crashes/5.fuzz Binary files differdeleted file mode 100644 index 0161596..0000000 --- a/tests/fuzz-crashes/5.fuzz +++ /dev/null diff --git a/tests/fuzz-crashes/Makefile.am b/tests/fuzz-crashes/Makefile.am index d332083..e69de29 100644 --- a/tests/fuzz-crashes/Makefile.am +++ b/tests/fuzz-crashes/Makefile.am @@ -1 +0,0 @@ -TEST_INPUTS += tests/fuzz-crashes/2.fuzz tests/fuzz-crashes/3.fuzz tests/fuzz-crashes/4.fuzz tests/fuzz-crashes/5.fuzz diff --git a/tools/check b/tools/check index 6e16098..08d9ad5 100755 --- a/tools/check +++ b/tools/check @@ -33,9 +33,9 @@ do exit 1 ;; esac - ../../configure --enable-maintainer-mode --enable-build-mode=$type CFLAGS="$CFLAGS -Wall -Wextra -Werror -std=c89 -pedantic" LDFLAGS="$LDFLAGS" $OTHER + ../../configure --enable-maintainer-mode --disable-shared --enable-build-mode=$type CFLAGS="$CFLAGS -Wall -Wextra -Werror -std=c89 -pedantic" LDFLAGS="$LDFLAGS" $OTHER make -j check - ../../configure --enable-maintainer-mode --enable-build-mode=$type CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $OTHER + ../../configure --enable-maintainer-mode --disable-shared --enable-build-mode=$type CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $OTHER cd .. done |