Raised This Month: $ Target: $400
 0% 

Solved Buffer overflow caused by using set_task incorrectly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-30-2021 , 01:43   Re: adminhelp error invalid id
Reply With Quote #1

Quote:
Originally Posted by Natsheh View Post
The unexpected behavior.
A memory leak does not cause unexpected brhavior. It just wastes memory.
__________________

Last edited by HamletEagle; 11-30-2021 at 01:43.
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-30-2021 , 03:12   Re: adminhelp error invalid id
Reply With Quote #2

Quote:
Originally Posted by HamletEagle View Post
A memory leak does not cause unexpected brhavior. It just wastes memory.
Well then what do cause these unexpected behaviors?

Also doesn't memory leak cause mem addresses to be overwritten?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-30-2021 at 03:30.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 11-30-2021 , 04:43   Re: adminhelp error invalid id
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
This is caused by a memory leak, but i am not sure why the player id is 100 and what causing the leak.
Player index 100 can be caused by one of your plugins because you are using ClientPutInServer engfunc and an entity is connecting. In your plugin using this method you pass a malformed index as entity's index and that is causing the error of client_print() native:
PHP Code:
Error
If a single client is specified and the index is not within
the range of 1 to MaxClients
an error will be thrown
http://www.amxmodx.org/api/amxmodx/client_print

There is no memory leak or something else, just a coding mistake.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
thEsp
BANNED
Join Date: Aug 2017
Old 11-30-2021 , 15:30   Re: adminhelp error invalid id
Reply With Quote #4

Quote:
Originally Posted by Shadows Adi View Post
Player index 100 can be caused by one of your plugins...
It can't be from another plugin when it's a function from the core module. As I said it's a bug within the game (HLDS) or AMXX (if it's just client_putinserver malfunctioning then so is the case).
thEsp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-29-2021 , 10:19   Re: adminhelp error invalid id
Reply With Quote #5

I just found a bug in pluginmenu.sma when you've opened the cvars menu and then you disconnected the menu handler will be called with item (3rd param) equal to MENU_EXIT then a newmenu( pluginsmenu ) will be created but the displayment of the menu won't work because the player had already left the server.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-29-2021 at 10:20.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-30-2021 , 04:45   Re: adminhelp error invalid id
Reply With Quote #6

Wow that was very nice explanation to what be the caused i have alot of doubts this might be issue thanks again hamlet !

Thanks for the pointing shadowali ill check it out.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-30-2021 at 04:46.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-01-2021 , 15:06   Re: adminhelp error invalid id
Reply With Quote #7

Seems the problem was caused by using set_task 5th parameter charsmax instead of sizeof in some of the plugins.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-01-2021 , 21:54   Re: adminhelp error invalid id
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
Seems the problem was caused by using set_task 5th parameter charsmax instead of sizeof in some of the plugins.
Which plugins?
__________________

Last edited by fysiks; 12-01-2021 at 21:54.
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-02-2021 , 03:32   Re: adminhelp error invalid id
Reply With Quote #9

The plugins from jb mod.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode