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:
3d77b5b
)
validate: check anonymous decl
author
Michael Wallner
<mike@php.net>
Tue, 5 Sep 2017 06:51:39 +0000
(08:51 +0200)
committer
Michael Wallner
<mike@php.net>
Tue, 5 Sep 2017 06:51:39 +0000
(08:51 +0200)
src/types/decl.c
patch
|
blob
|
history
diff --git
a/src/types/decl.c
b/src/types/decl.c
index 95122ab1d9dad9112f172324f534abd1999b9ae2..51dd733350b49073fbf4befc921426e1718c5633 100644
(file)
--- a/
src/types/decl.c
+++ b/
src/types/decl.c
@@
-85,6
+85,10
@@
static inline bool psi_decl_validate_func(struct psi_data *data,
{
struct psi_func_redir *redir;
+ if (!func->var->name) {
+ data->error(data, func->token, PSI_WARNING, "Anonymous decl!");
+ return false;
+ }
if (!strcmp(func->var->name, "dlsym")) {
data->error(data, func->token, PSI_WARNING,
"Cannot dlsym dlsym (sic!)");