View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-16-2022 , 03:28   Re: Indexing a string inside a native will cause outbounds?
Reply With Quote #3

Nah its just a question out of curiosity.

Can you explain how does it make sense?


For example lets say this is the body function of

PHP Code:
get_user_name(idname[], len)
{
   for(new 
i; <= leni++)
   {
      
name[i] = g_PlayerName[i];
      
// Since we passed 10 to the array cell in the second parameter we advanced 10x4bytes, now we're accessing memory not allocated to us, which will probably cause a crash.

   
}

Yeah so it seems it might cause index out of bounds but also memory access error.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-16-2022 at 03:44.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh