mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[ruamoko] Check self is within progs memory
Changes a segfault to a runtime error, which beats the risk of self pointing somewhere that doesn't segrault.
This commit is contained in:
parent
edf7a781fd
commit
c5ae1ae13c
1 changed files with 3 additions and 0 deletions
|
@ -1536,6 +1536,9 @@ rua_obj_msgSend (progs_t *pr)
|
|||
R_INT (pr) = P_INT (pr, 0);
|
||||
return;
|
||||
}
|
||||
if (P_UINT (pr, 0) >= pr->globals_size) {
|
||||
PR_RunError (pr, "invalid self: %x", P_UINT (pr, 0));
|
||||
}
|
||||
if (!_cmd)
|
||||
PR_RunError (pr, "null selector");
|
||||
imp = obj_msg_lookup (probj, self, _cmd);
|
||||
|
|
Loading…
Reference in a new issue