aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffi/ffi_util.h')
-rw-r--r--src/lib/ffi/ffi_util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi_util.h b/src/lib/ffi/ffi_util.h
index 684b25870..f72af0a63 100644
--- a/src/lib/ffi/ffi_util.h
+++ b/src/lib/ffi/ffi_util.h
@@ -128,7 +128,10 @@ inline int write_output(uint8_t out[], size_t* out_len, const uint8_t buf[], siz
}
else
{
- Botan::clear_mem(out, avail);
+ if(out != nullptr)
+ {
+ Botan::clear_mem(out, avail);
+ }
return BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE;
}
}