Raised This Month: $ Target: $400
 0% 

[ANY] Command and ConVar - Buffer Overflow Fixer (2.9a) [05-Aug-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6216
Plugin Version:
2.9a
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1110 
    Plugin Description:
    Fixes the 'Cbuf_AddText: buffer overflow' console error on servers, which causes ConVars to use their default value.
    Old 08-02-2018 , 20:00   [ANY] Command and ConVar - Buffer Overflow Fixer (2.9a) [05-Aug-2024]
    Reply With Quote #1

    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.9a (05-Aug-2024)
        - Updated GameData signature for TF2 being broken on Windows due to some game update. Thanks to "LapplandBro" for reporting.
    
    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.
    Attached Files
    File Type: txt command_buffer.games.txt (2.6 KB, 414 views)
    File Type: sp Get Plugin or Get Source (command_buffer.sp - 2130 views - 8.3 KB)
    __________________

    Last edited by Silvers; 08-05-2024 at 05:05.
    Silvers is offline
    mug1wara
    AlliedModders Donor
    Join Date: Jun 2018
    Old 08-02-2018 , 20:45   Re: [ANY] Command and ConVar - Buffer Overflow Fixer
    Reply With Quote #2

    Good job you guys, definately see this useful for lots of serverowners
    mug1wara is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 08-02-2018 , 21:27   Re: [ANY] Command and ConVar - Buffer Overflow Fixer
    Reply With Quote #3

    Nice one dude!
    __________________
    Psyk0tik is offline
    Naomi
    Junior Member
    Join Date: Aug 2017
    Old 08-02-2018 , 21:54   Re: [ANY] Command and ConVar - Buffer Overflow Fixer
    Reply With Quote #4

    Yay! finally can fix the spam for L4D2
    Naomi is offline
    ricksfishin
    Senior Member
    Join Date: Oct 2017
    Old 08-02-2018 , 22:42   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
    Reply With Quote #5

    Awesome Silvers Thank you.
    ricksfishin is offline
    jking
    AlliedModders Donor
    Join Date: Jan 2012
    Old 08-03-2018 , 16:21   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
    Reply With Quote #6

    Win ver ETA?
    jking is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-07-2018 , 15:15   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
    Reply With Quote #7

    Quote:
    Originally Posted by jking View Post
    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
    __________________

    Last edited by Silvers; 08-08-2018 at 04:49. Reason: smilies in date
    Silvers is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 08-09-2018 , 23:15   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.1) [07-Aug-2018]
    Reply With Quote #8

    Something that was needed for so long. Amazing work as always.

    Line: 108
    PHP Code:
    if( cvar != INVALID_HANDLE && GetConVarInt(cvar) != cv++; 

    PHP Code:
    if( cvar != INVALID_HANDLE && cvar.IntValue != cv++; 
    Just sticking to object oriented API.
    __________________
    Spirit_12 is offline
    tretray
    Junior Member
    Join Date: Sep 2018
    Old 09-15-2018 , 14:21   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.1) [07-Aug-2018]
    Reply With Quote #9

    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.
    Attached Thumbnails
    Click image for larger version

Name:	Capture.PNG
Views:	960
Size:	6.2 KB
ID:	171391  

    Last edited by tretray; 09-15-2018 at 14:22.
    tretray is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-15-2018 , 14:22   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.1) [07-Aug-2018]
    Reply With Quote #10

    Which game, OS?
    __________________
    Silvers is offline
    Reply


    Thread Tools
    Display Modes

    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 13:05.


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