Skip to content
Permalink
Browse files

Fix #7152 - Null deref in cms

  • Loading branch information...
wargio authored and radare committed Mar 27, 2017
1 parent 6de4961 commit 7ab66cca5bbdf6cb2d69339ef4f513d95e532dbf
Showing with 3 additions and 1 deletion.
  1. +3 −1 libr/util/r_pkcs7.c
@@ -284,7 +284,9 @@ RCMS *r_pkcs7_parse_cms (const ut8 *buffer, ut32 length) {
return NULL;
}
object = r_asn1_create_object (buffer, length);
if (!object || object->list.length != 2 || !object->list.objects[0] || object->list.objects[1]->list.length != 1) {
if (!object || object->list.length != 2 || !object->list.objects ||
!object->list.objects[0] || !object->list.objects[1] ||
object->list.objects[1]->list.length != 1) {
r_asn1_free_object (object);
free (container);
return NULL;

0 comments on commit 7ab66cc

Please sign in to comment.
You can’t perform that action at this time.