[libc] use vars in string to num fuzz targets
authorMichael Jones <michaelrj@google.com>
Thu, 16 Feb 2023 19:23:44 +0000 (11:23 -0800)
committerMichael Jones <michaelrj@google.com>
Mon, 27 Feb 2023 21:21:35 +0000 (13:21 -0800)
commit62e7bdd22a95b92d04e61f93b6aea4d95a5030fd
treefb76bf4a35acf6ee0c3adb85585fcc8b681c28fa
parent387452ec591c81def6d8869b23c2ab2f1c56f999
[libc] use vars in string to num fuzz targets

The string to integer and string to float standalone fuzz targets just
ran the functions and didn't do anything with the output. This was
intentional, since they are intended to be used with sanitizers to
detect buffer overflow bugs. Not using the variables was causing compile
warnings, so this patch adds trivial checks to use the variables.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D144208
libc/fuzzing/stdlib/strtofloat_fuzz.cpp
libc/fuzzing/stdlib/strtointeger_fuzz.cpp