Add fuzz targets
Fuzzing is something that's good to do for a general purpose library and
can find bugs relatively quickly.
Enable fuzzing with libfuzzer (selected only because it was the easiest
to set up) and enable fuzz targets for 3 of our buffer-based interfaces.
Change-Id: I695a3a60ba09bea92cd462566bf2c46337eabd4b
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/base64.c b/base64.c
index 38ea0ab..5ed39c6 100644
--- a/base64.c
+++ b/base64.c
@@ -20,6 +20,10 @@
const UINT8 *src_end;
const UINT8 *in_pos;
+ if (len <= 0) {
+ return NULL;
+ }
+
if (!out_len) {
return NULL;
}