Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class

svn-id: r49327
This commit is contained in:
Filippos Karapetis 2010-05-30 16:14:31 +00:00
parent 0276ec835e
commit c32e88fe0b
10 changed files with 33 additions and 28 deletions

View file

@ -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;