Raised This Month: $252 Target: $400
 63% 

[ANY] Command and ConVar - Buffer Overflow Fixer (2.4) [10-May-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6216
Plugin Version:
2.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    214 
    Plugin Description:
    Fixes the 'Cbuf_AddText: buffer overflow' console error on servers, which causes ConVars to use their default value.
    Old 08-02-2018 , 19:00   [ANY] Command and ConVar - Buffer Overflow Fixer (2.4) [10-May-2020]
    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 (helping me understand the .cpp files and functions).
    • Lux (various scripting advice and helping figure out stuff).
    • Timocop (L4D1 Linux binary and testing).
    • Dragokas (some optimizations update).



    ConVar Testing:
    Spoiler




    ConVars:

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



    Changes:
    Code:
    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:


    Installation:
    DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires DHooks!
    1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder. (Compiled with 1.10).
    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.8 KB, 147 views)
    File Type: smx command_buffer.smx (4.5 KB, 201 views)
    File Type: sp Get Plugin or Get Source (command_buffer.sp - 173 views - 6.7 KB)
    __________________

    Last edited by Silvers; 07-14-2020 at 16:09.
    Silvers is offline
    mug1wara
    AlliedModders Donor
    Join Date: Jun 2018
    Location: Not your business.
    Old 08-02-2018 , 19: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
    __________________
    Taking requests, add me on Steam.

    People make themselves understood in a way, others understand in another.
    mug1wara is offline
    Crasher_3637
    AlliedModders Donor
    Join Date: May 2012
    Old 08-02-2018 , 20:27   Re: [ANY] Command and ConVar - Buffer Overflow Fixer
    Reply With Quote #3

    Nice one dude!
    __________________
    AFK like JFK
    Crasher_3637 is offline
    Naomi
    Junior Member
    Join Date: Aug 2017
    Old 08-02-2018 , 20: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 , 21: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 , 15:21   Re: [ANY] Command and ConVar - Buffer Overflow Fixer (2.0.1)
    Reply With Quote #6

    Win ver ETA?
    jking is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-07-2018 , 14: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 03:49. Reason: smilies in date
    Silvers is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 08-09-2018 , 22: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 , 13: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:	427
Size:	6.2 KB
ID:	171391  

    Last edited by tretray; 09-15-2018 at 13:22.
    tretray is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-15-2018 , 13: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 16:09.


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