projects
/
m6w6
/
ext-psi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
37fe426
)
null pointer safeguards
author
Michael Wallner
<mike@php.net>
Tue, 5 Sep 2017 06:52:07 +0000
(08:52 +0200)
committer
Michael Wallner
<mike@php.net>
Tue, 5 Sep 2017 06:52:07 +0000
(08:52 +0200)
src/types/decl_struct.c
patch
|
blob
|
history
diff --git
a/src/types/decl_struct.c
b/src/types/decl_struct.c
index cc7cc69871700fdb7313ce511858573cdbedbcdd..9ba53e97348a3856dc0d98e806b140a889068bd7 100644
(file)
--- a/
src/types/decl_struct.c
+++ b/
src/types/decl_struct.c
@@
-84,6
+84,9
@@
bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s,
size_t i, pos, len, size, align;
struct psi_decl_arg *darg, *prev_arg;
+ if (!s) {
+ return false;
+ }
if (psi_validate_stack_has_struct(type_stack, s->name)) {
return true;
}
@@
-198,6
+201,9
@@
bool psi_decl_struct_validate(struct psi_data *data, struct psi_decl_struct *s,
size_t psi_decl_struct_get_align(struct psi_decl_struct *s)
{
+ if (!s) {
+ return 0;
+ }
if (!s->align) {
s->align = psi_decl_type_get_args_align(s->args);
}