only check 1-char annotations
authorMichael Wallner <mike@php.net>
Fri, 10 Dec 2021 22:11:19 +0000 (23:11 +0100)
committerMichael Wallner <mike@php.net>
Tue, 14 Dec 2021 11:54:08 +0000 (12:54 +0100)
ion_private.h

index 56da560b39b19b374c40364c90ce22c4853bb369..5f2cc306ee1ef0926b7c8a5730475a087304ea3d 100644 (file)
@@ -1622,6 +1622,10 @@ static inline void php_ion_unserialize_annotations(php_ion_unserializer *ser)
                ION_STRING ann_str;
                ION_CHECK(ion_reader_get_an_annotation(ser->reader, i, &ann_str));
 
+               if (ann_str.length > 1) {
+                       continue;
+               }
+
                switch (*ann_str.value) {
                case 'R':
                        if (ser->annotations.makeref) {