VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/libzip/zip_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/libzip/zip_error.c')
-rw-r--r--src/Common/libzip/zip_error.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Common/libzip/zip_error.c b/src/Common/libzip/zip_error.c
index 5fc2e838..c498e086 100644
--- a/src/Common/libzip/zip_error.c
+++ b/src/Common/libzip/zip_error.c
@@ -132,7 +132,12 @@ zip_error_set(zip_error_t *err, int ze, int se) {
void
-_zip_error_set_from_source(zip_error_t *err, zip_source_t *src) {
+zip_error_set_from_source(zip_error_t *err, zip_source_t *src) {
+ if (src == NULL) {
+ zip_error_set(err, ZIP_ER_INVAL, 0);
+ return;
+ }
+
_zip_error_copy(err, zip_source_error(src));
}