We simply return 0 because failure here is not a problem with the code we
are actually trying to fuzz. Without this asan is unhappy.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
{
struct ldb_dn *dn = NULL;
struct ldb_context *ldb = ldb_init(NULL, NULL);
+ if (ldb == NULL) {
+ return 0;
+ }
/*
* We copy the buffer in order to NUL-terminate, because running off
* the end of the string would be an uninteresting crash.
int LLVMFuzzerTestOneInput(uint8_t *input, size_t len)
{
struct ldb_ldif *ldif = NULL;
- struct ldb_context *ldb = ldb_init(NULL, NULL);
const char *s = NULL;
+ struct ldb_context *ldb = ldb_init(NULL, NULL);
+ if (ldb == NULL) {
+ return 0;
+ }
if (len > MAX_LENGTH) {
len = MAX_LENGTH;
{
struct ldb_control *control = NULL;
struct ldb_context *ldb = ldb_init(NULL, NULL);
+ if (ldb == NULL) {
+ return 0;
+ }
/*
- * We copy the buffer in order to NUL-teminate, because running off
+ * We copy the buffer in order to NUL-terminate, because running off
* the end of the string would be an uninteresting crash.
*/
if (len > MAX_LENGTH) {