projects
/
awesomized
/
ext-ion
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
90a4807
)
check for NULL on any valid ION type
author
Michael Wallner
<mike@php.net>
Tue, 14 Dec 2021 11:38:25 +0000
(12:38 +0100)
committer
Michael Wallner
<mike@php.net>
Tue, 14 Dec 2021 11:54:08 +0000
(12:54 +0100)
ion_private.h
patch
|
blob
|
history
diff --git
a/ion_private.h
b/ion_private.h
index 93b3058280c29d12149229564aeaa29d70794c9c..5ca03dab2c63cbd16689bbedbbc2fa7d1dbc744b 100644
(file)
--- a/
ion_private.h
+++ b/
ion_private.h
@@
-1763,6
+1763,14
@@
static inline void php_ion_unserialize_zval(php_ion_unserializer *ser, zval *ret
ZVAL_DEREF(return_value);
}
+ if (ION_TYPE_INT(*typ) > 0) {
+ BOOL is_null;
+ ION_CHECK(ion_reader_is_null(ser->reader, &is_null));
+ if (is_null) {
+ RETURN_NULL();
+ }
+ }
+
switch (ION_TYPE_INT(*typ)) {
case tid_NULL_INT:
ION_CHECK(ion_reader_read_null(ser->reader, typ));