Fix nullptr dereference in FLAC++ master
authorTamás Zahola <tamas.zahola@shapr3d.com>
Thu, 26 Dec 2019 21:21:05 +0000 (22:21 +0100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 27 Dec 2019 00:34:06 +0000 (11:34 +1100)
src/libFLAC++/metadata.cpp

index 6cb1ce6..374e5b3 100644 (file)
@@ -55,6 +55,9 @@ namespace FLAC {
 
                        Prototype *construct_block(::FLAC__StreamMetadata *object)
                        {
+                               if (0 == object)
+                                       return 0;
+
                                Prototype *ret = 0;
                                switch(object->type) {
                                        case FLAC__METADATA_TYPE_STREAMINFO: