libexpat/expat/fuzz
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
..
.gitignore File expat/fuzz/.gitignore changed to not ignore already-committed source files (fixes #630) (#631) 2022-08-20 23:37:46 +02:00
xml_lpm_fuzzer.cpp Sync file headers 2025-02-03 01:37:51 +01:00
xml_lpm_fuzzer.proto Sync file headers 2025-02-03 01:37:51 +01:00
xml_parse_fuzzer.c fuzz: Address clang-tidy bugprone-narrowing-conversions 2025-03-30 18:52:09 +02:00
xml_parsebuffer_fuzzer.c fuzz: Address clang-tidy bugprone-narrowing-conversions 2025-03-30 18:52:09 +02:00