fixed missing string index check
@@ -202,6 +202,10 @@ void ring_vm_loadindexaddress ( VM *pVM )
}
}
else if ( RING_VM_STACK_ISSTRING ) {
+ if ( nNum1 < 1 || nNum1 > RING_VM_STACK_STRINGSIZE ) {
+ ring_vm_error(pVM,RING_VM_ERROR_INDEXOUTOFRANGE);
+ return ;
+ }
cStr2[0] = RING_VM_STACK_READC[((int) nNum1)-1] ;
cStr2[1] = '\0' ;
RING_VM_STACK_SETCVALUE2(cStr2,1);
