read_security_data() fix
authorEric Biggers <ebiggers3@gmail.com>
Tue, 14 Aug 2012 04:46:52 +0000 (23:46 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 14 Aug 2012 04:46:52 +0000 (23:46 -0500)
src/security.c

index 9707bd313359383f4b8a6c9bd4f81e0fe11eedeb..c6bbf7cb48908b876b18e3b5e47c3898aaa5769b 100644 (file)
@@ -127,6 +127,8 @@ int read_security_data(const u8 metadata_resource[], u64 metadata_resource_len,
                              "(current total length = %"PRIu64", security "
                              "descriptor size = %"PRIu64")",
                              total_len, sd->sizes[i]);
+                       ret = WIMLIB_ERR_INVALID_SECURITY_DATA;
+                       goto out_free_sd;
                }
                total_len += sd->sizes[i];
                if (total_len > (u64)sd->total_length) {