AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Command and ConVar - Buffer Overflow Fixer (2.9) [23-Jan-2024] (https://forums.alliedmods.net/showthread.php?t=309656)

Silvers 08-02-2018 19:00

[ANY] Command and ConVar - Buffer Overflow Fixer (2.9) [23-Jan-2024]
 
31 Attachment(s)
About:
  • This plugin fixes servers with too many ConVars, which causes a buffer overflow error in server console and the overflowed ConVars to use their default value instead of the one specified.
  • This should also fix commands which failed to be executed caused by the same buffer overflow.
  • Note: If your server is hibernating the fix will happen on the next frame when it wakes.
  • Initial thread and plugin version here.
  • This fixes "Cbuf_AddText: buffer overflow" error messages.



Related Plugins:


Supported Games:
  • CS:S
  • CSGO
  • L4D1
  • L4D2
  • OrangeBox [GoldenEye etc]
  • Team Fortress 2
  • Request support if your game suffers from this bug.



Thanks:
  • Peace-Maker (for DHooks Dev Preview and helping script this plugin).
  • Dr!fter (for initially creating DHooks extension).
  • Dragokas (optimizations , helping me understand the .cpp files and functions).
  • Lux (various scripting advice and helping figure out stuff).
  • Timocop (L4D1 Linux binary and testing).



ConVar Testing:
Spoiler




ConVars:

PHP Code:

// Command and ConVar - Buffer Overflow Fixer plugin version.
command_buffer_version 




Changes:
Code:

2.9 (23-Jan-2024)
    - Fixed memory leak from clearing ArrayList handles. Thanks to "HarryPotter" for help solving.

2.8b (11-Feb-2023)
    - Updated GameData signature for CS:GO. Thanks to "foxsay" for reporting.

2.8 (19-Jan-2022)
    - Fixed leaking handles when triggered to fix buffer issues.

2.7 (06-Dec-2021)
    - Fixed the last version breaking plugin functionality. Thanks to "sorallll" for reporting.

2.6 (27-Nov-2021)
    - Fixed "Failed to grow array" error. Thanks to "azureblue" for reporting.

2.5a (16-Jun-2021)
    - L4D2: Compatibility update for "2.2.1.3" update. Thanks to "ProjectSky" for reporting and "bedildewo" for fixing.
    - GameData .txt file and plugin updated.

2.5 (03-May-2021)
    - Fixed errors when inputting a string with format specifiers. Thanks to "sorallll" for reporting and "Dragokas" for fix.

2.4a (19-May-2020)
    - Added support for Team Fortress 2. Only GameData changed.

2.4 (10-May-2020)
    - Added better error log message when gamedata file is missing.
    - Various changes to tidy up code.

2.3 (03-Feb-2020)
    - Fixed debugging using the wrong methodmap. Thanks to "Caaine" for reporting.

2.2 (03-Feb-2020) by Dragokas
    - Added delete to an unused handle.
    - Changed "char" to "static char" in "OnNextFrame" to optimize performance.

2.1 (07-Aug-2018)
    - Added support for GoldenEye and other games using the OrangeBox engine on Windows and Linux.
    - Added support for Left4Dead2 Windows.
    - Gamedata .txt and plugin updated.

2.0.1 (02-Aug-2018)
    - Turned off debugging.

2.0 (02-Aug-2018)
    - Now fixes all ConVars from being set to incorrect values.
    - Supports CSGO (win/nix), L4D1 (win/nix) and L4D2 (nix).
    - Other games with issues please request support.

1.0 (27-Jun-2018)
    - Initial release.




Requirements:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
  2. Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.
  3. You must restart the server.

mug1wara 08-02-2018 19:45

Re: [ANY] Command and ConVar - Buffer Overflow Fixer
 
Good job you guys, definately see this useful for lots of serverowners :)

Psyk0tik 08-02-2018 20:27

Re: [ANY] Command and ConVar - Buffer Overflow Fixer
 
Nice one dude! :D :bacon!:

Naomi 08-02-2018 20:54

Re: [ANY] Command and ConVar - Buffer Overflow Fixer
 
Yay! finally can fix the spam for L4D2

ricksfishin 08-02-2018 21:42

Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
 
Awesome Silvers Thank you.

jking 08-03-2018 15:21

Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
 
Win ver ETA? :bacon!: :bacon!:

Silvers 08-07-2018 14:15

Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
 
Quote:

Originally Posted by jking (Post 2607955)
Win ver ETA? :bacon!: :bacon!:

Not required from my testing. But added.


Quote:

2.1 (07-Aug-2018)
- Added support for GoldenEye and other games using the OrangeBox engine on Windows and Linux.
- Added support for Left4Dead2 Windows - not required from my testing on a Dedicated Server.
- Gamedata .txt and plugin updated.
All OrangeBox games seem to suffer from this bug, plugin should now support them all.

Edit: Theres a new version of DHooks which no longer crashes the server when reloading a plugin using the "functions" gamedata section. I suggest everyone update to this goodness.

Enjoy

Spirit_12 08-09-2018 22:15

Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.1) [07-Aug-2018]
 
Something that was needed for so long. Amazing work as always.

Line: 108
PHP Code:

if( cvar != INVALID_HANDLE && GetConVarInt(cvar) != cv++; 

:arrow:
PHP Code:

if( cvar != INVALID_HANDLE && cvar.IntValue != cv++; 

Just sticking to object oriented API.

tretray 09-15-2018 13:21

Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.1) [07-Aug-2018]
 
1 Attachment(s)
Errors:

command_buffer.smx ([ANY] Command and ConVar - Buffer Overflow Fixer): Native "DHookCreateFromConf" was not found

Other plugins that require Dhooks work. I do have command_buffer.games.txt in my sourcemod/gamedata folder.

Silvers 09-15-2018 13:22

Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.1) [07-Aug-2018]
 
Which game, OS?


All times are GMT -4. The time now is 23:24.

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