Commit graph

8 commits

Author SHA1 Message Date
Sebastian Pipping
57a7643252 fuzz: Address clang-tidy bugprone-narrowing-conversions
The symptom was:
> [..]/expat/fuzz/xml_parse_fuzzer.c:68:40: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
>    68 |   XML_Parse(p, (const XML_Char *)data, size, 0);
>       |                                        ^
> [..]/expat/fuzz/xml_parse_fuzzer.c:69:44: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
>    69 |   if (XML_Parse(p, (const XML_Char *)data, size, 1) == XML_STATUS_ERROR) {
>       |                                            ^
> [..]/expat/fuzz/xml_parsebuffer_fuzzer.c:69:32: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
>    69 |   void *buf = XML_GetBuffer(p, size);
>       |                                ^
> [..]/expat/fuzz/xml_parsebuffer_fuzzer.c:72:22: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
>    72 |   XML_ParseBuffer(p, size, 0);
>       |                      ^
> [..]/expat/fuzz/xml_parsebuffer_fuzzer.c:73:26: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
>    73 |   buf = XML_GetBuffer(p, size);
>       |                          ^
> [..]/expat/fuzz/xml_parsebuffer_fuzzer.c:78:26: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
>    78 |   if (XML_ParseBuffer(p, size, 1) == XML_STATUS_ERROR) {
>       |                          ^
2025-03-30 18:52:09 +02:00
Hanno Böck
87fb1a42f0 Update links in code comments to https 2025-03-07 08:42:42 +01:00
Philippe Antoine
34af886238 fuzz: improve coverage by maybe stopping parser 2024-01-16 11:08:44 +01:00
Sebastian Pipping
73ebe0bfb3 fuzz: Address warning -Wunused-function with regard to sip24_valid 2024-01-15 23:57:02 +01:00
Philippe Antoine
bb58abd4e0 fuzz: improve coverage 2024-01-10 22:06:37 +01:00
Sebastian Pipping
0e567d2ed1 fuzzers: Address Clang warning -Wunused-parameter 2021-03-10 16:21:00 +01:00
luz.paz
56893d4fbb Fix source comment typos
Found via `codespell -q 3 -S ./testdata,./expat/Changes`
2019-11-04 07:52:31 -05:00
Mitch Phillips
29eddcae5f Add XML fuzzers to libexpat upstream. (#308) 2019-08-28 12:57:57 +02:00