mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Ensure struct params are small enough to fit in the param slots.
This commit is contained in:
parent
624a1630f3
commit
e5e560cbaf
1 changed files with 4 additions and 0 deletions
|
@ -146,6 +146,10 @@ parse_params (type_t *type, param_t *parms)
|
|||
}
|
||||
new.num_parms = -(new.num_parms + 1);
|
||||
} else if (p->type) {
|
||||
if (type_size (p->type) > type_size (&type_param)) {
|
||||
error (0, "param too large to be passed by value");
|
||||
return type;
|
||||
}
|
||||
new.parm_types[new.num_parms] = p->type;
|
||||
new.num_parms++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue