Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
svn-id: r49327
This commit is contained in:
parent
0276ec835e
commit
c32e88fe0b
10 changed files with 33 additions and 28 deletions
|
@ -628,7 +628,7 @@ int Kernel::findRegType(reg_t reg) {
|
|||
|
||||
switch (mobj->getType()) {
|
||||
case SEG_TYPE_SCRIPT:
|
||||
if (reg.offset <= (*(Script *)mobj)._bufSize &&
|
||||
if (reg.offset <= (*(Script *)mobj).getBufSize() &&
|
||||
reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET &&
|
||||
RAW_IS_OBJECT((*(Script *)mobj)._buf + reg.offset)) {
|
||||
return ((Script *)mobj)->getObject(reg.offset) ? KSIG_OBJECT : KSIG_REF;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue