Kawe Mazidjatari
129637e8e6
Fix incorrect netmsg constant
...
Should be '7' based on the calls to 'bf_write::WriteUBitLong' in the game executable.
2023-04-10 14:58:21 +02:00
Kawe Mazidjatari
e4bea5a88f
Update README.md
2023-04-10 02:11:25 +02:00
Kawe Mazidjatari
8171d4530f
Update thirdpartylegalnotices.txt
2023-04-10 02:10:51 +02:00
Kawe Mazidjatari
fd2c7864b9
Update VPK build scripts
...
* Added 'mp_rr_party_crasher'.
* Renamed 'mp_lobby' to 'mp_common' for server.
2023-04-10 02:09:16 +02:00
Kawe Mazidjatari
7c6094fc19
Bump sigcache version
...
Bumped to force a full rebuild of the signature cache map.
2023-04-10 00:13:05 +02:00
Kawe Mazidjatari
7ae19d245a
Bump version gate string
...
Bumped to '008' for version gating as this release fixes security issues.
2023-04-10 00:12:27 +02:00
Kawe Mazidjatari
294ac7d02e
Enable COMDAT folding and reference linker optimizations for netconsole project
2023-04-10 00:11:29 +02:00
Kawe Mazidjatari
c116479c37
Fix naveditor compiler error
...
Use the global variant instead, as the std variant requires a locale.
2023-04-09 23:52:25 +02:00
Kawe Mazidjatari
99ff9492a8
Fix SDK initialization order bug
...
Fix initialization order bug; 'CheckCPU()' and 'MathLib_Init()' have to be initialized before any other function is called. 'strstr(...)' also uses intrinsics not supported on some processors.
2023-04-09 23:38:55 +02:00
Kawe Mazidjatari
7aa07083ca
CBitRead::ReadString: Improve readability
...
The intention of null-terminating the string is clearer when using '\0' instead of '0' or 'NULL'.
2023-04-09 23:35:58 +02:00
Kawe Mazidjatari
3dd4054838
'IsValidUTF8' const correctness
...
Does not modify the string; make it const.
2023-04-09 23:34:06 +02:00
Kawe Mazidjatari
381f09b1d7
CTextLogger: Skip newline characters when advancing cursor
...
Skip newline characters to avoid having to issue a move left/right command twice before seeing the cursor move.
2023-04-09 23:33:10 +02:00
Kawe Mazidjatari
dbf3b5b91d
Improve ImGui logger API
...
* Better structure packing (reduced padding).
* 'CTextLogger::GetFilter' now returns a reference to 'm_itFilter'.
* Added additional setters and getters.
2023-04-09 22:35:55 +02:00
Kawe Mazidjatari
b0f94fd641
Fix compiler warnings
...
* Comment unused code.
* Explicitly cast input and results to/from 'toupper'.
2023-04-09 22:24:25 +02:00
Kawe Mazidjatari
bd8b9e8c77
Improve server print messages
...
Always format with a newline if one is missing.
Calculate string size directly from 'ReadString' in 'SVC_UserMessage::ProcessImpl'.
Added additional asserts to detect code errors.
2023-04-09 22:22:06 +02:00
Kawe Mazidjatari
a39afd4efe
CTextLogger: Manage keyboard and mouse inputs
...
Manage them under 1 member variable.
2023-04-09 19:53:33 +02:00
Kawe Mazidjatari
d46cc0d6b1
Remove unused member variables
2023-04-09 19:37:00 +02:00
Kawe Mazidjatari
fe2bd4c4d8
Make sure only UTF-8 encoded strings are getting logged
...
This should fix all bugs and vulnerabilities to the ImGui console. This code has been fuzzed for hours without triggering any exceptions or assertions.
2023-04-09 19:36:30 +02:00
Kawe Mazidjatari
810870b611
Fix buffer overflow in ImGui text logger
...
Fix a potential buffer overflow that could be triggered by logging invalid characters to the Dear ImGui console. The incrementation of the loop control variable performed by 'UTF8CharLength' was never validated.
2023-04-09 16:15:08 +02:00
Kawe Mazidjatari
678c6dc833
Add proper timing logic for server statistics
...
Update rate is now controller by a cvar.
2023-04-09 11:06:55 +02:00
Kawe Mazidjatari
8a052f819d
Improve error string
2023-04-08 20:15:16 +02:00
Kawe Mazidjatari
94d30b759d
Fix potential security flaws caused by uncontrolled format strings
...
Make sure format strings are string literals to avoid an uncontrolled format string situation.
2023-04-08 20:13:06 +02:00
rexx
cebca2ca04
Fix security flaws in use of format strings
...
In all cases, the string is already formatted by the time that DrawColoredText is called, so we must make sure that an invalid format specifier cannot be placed inside the string as this can cause arbitrary memory reading and potentially crashes
2023-04-08 18:42:20 +01:00
Kawe Mazidjatari
f09bdc472b
Suppress compiler warning and avoid potential bug
...
The string literal will never change during runtime; this commit is to make sure no mistakes are made in future refactors.
2023-04-08 19:14:00 +02:00
Kawe Mazidjatari
a7cab1d891
Fix potential security flaws caused by uncontrolled format strings
...
Make sure format strings are string literals to avoid an uncontrolled format string situation.
2023-04-08 19:10:59 +02:00
Kawe Mazidjatari
2c28391ca4
Make 'FL_EDICT_INVALID' unsigned
...
Should be unsigned as the type we test this on (edict_t) is of type unsigned short.
2023-04-08 19:02:14 +02:00
Kawe Mazidjatari
504a20945e
Fix bug caused by never returning a value
...
Probably does return in compiled code, but this was never explicitly defined.
2023-04-08 19:01:35 +02:00
Kawe Mazidjatari
1d04f837f8
Fix many high level compiler warnings
...
* Put initializer values inside brackets.
* Put logical AND conditions within parentheses.
* Put assignments within conditional statements within parentheses.
* Mark unused variables as such to suppress compiler warnings.
* Fix vftable shadow warnings caused by ConVar::CreateInternal (does not implement, only interface. Renamed to yield desired behavior).
* Fix 'never' initialized class members for 'CCVarIteratorInternal'.
* Return values in interface vftables that cannot be pure virtual.
2023-04-08 19:00:28 +02:00
Kawe Mazidjatari
a83d5737e7
Fix non-portable include paths
...
Portable include paths are case sensitive.
2023-04-08 18:54:31 +02:00
Kawe Mazidjatari
4079956356
Fix non-portable include paths
...
Portable include paths are case sensitive.
2023-04-08 18:52:33 +02:00
Kawe Mazidjatari
a2bb707902
Fix unhandled enumerants in switch statement
2023-04-08 18:30:38 +02:00
Kawe Mazidjatari
f62092d6f2
Fix sign of array subscript
...
Must be unsigned to avoid indexing on negative numbers.
2023-04-08 18:28:39 +02:00
Kawe Mazidjatari
21ea4dff52
Return maps based on partial input
...
Return maps based on partial input from user in main 'map' completion callback function.
2023-04-08 18:19:14 +02:00
Kawe Mazidjatari
60b38e8904
Implement 'StringUnescape' properly
2023-04-08 18:05:05 +02:00
Kawe Mazidjatari
dc6bdc4a3a
Fix incorrect ctor order
2023-04-08 17:46:08 +02:00
Kawe Mazidjatari
23b2d0174a
Fix incorrect ctor order
2023-04-08 17:45:21 +02:00
rexx
7a4358800d
Fix potential crash from server prints
2023-04-08 16:07:43 +01:00
Kawe Mazidjatari
f5a86f7087
Make global timestamp const
...
Should never change once initialized.
2023-04-08 16:11:25 +02:00
Kawe Mazidjatari
d49f252f4d
Write minidump and slight code improvements
...
* Write minidumps to disk when the game crashes.
* Initialize global process timestamp as early as possible and separate from log dir.
2023-04-08 16:09:23 +02:00
Kawe Mazidjatari
b089c59062
Properly implement 'CCrashHandler::FormatFPU'
...
Fixes a bug causing decimal numbers to be displayed while negative numbers in register equals or exceeds one million.
2023-04-08 13:34:31 +02:00
Kawe Mazidjatari
4890593203
Add absolute array comparators
...
Check for highest/lowest value in array (absolute).
2023-04-08 13:32:34 +02:00
Kawe Mazidjatari
16910aa45c
Use custom string formatter
...
Enforce consistency through code base by using the same format specifiers.
2023-04-08 10:50:32 +02:00
Kawe Mazidjatari
9f428f1567
Move tier0 lib headers to public
...
This commit does not change any logic or behavior of the code.
2023-04-06 23:50:48 +02:00
Kawe Mazidjatari
5e95b280c0
Fix level 3/4 compiler warnings
...
Fix level 3 and 4 compiler warnings in 'lzss.cpp'.
2023-04-06 21:01:42 +02:00
Kawe Mazidjatari
874faea430
Add hook to CLZSS::SafeUncompress
...
Added hook to use the SDK implementation of 'CLZSS::SafeUncompress' instead, since the one in the game executable does not check bounds on the iterator pointer. This fixes the problem of people crashing servers with malicious packets.
2023-04-06 00:28:58 +02:00
Kawe Mazidjatari
596e827352
Add platform defines for endianness
2023-04-05 23:01:46 +02:00
Kawe Mazidjatari
a5489f16b6
Fix small oversight
...
Should be '+1' as 'position' could be 0.
2023-04-05 22:58:26 +02:00
Kawe Mazidjatari
e76f5b98c8
CLZSS: Fix bug causing iterator to go out of bounds
...
Check if 'position' exceeds buffer size.
2023-04-05 22:31:37 +02:00
Kawe Mazidjatari
dbe1850ec1
Add LZSS implementation to SDK
2023-04-05 21:38:28 +02:00
Kawe Mazidjatari
69775ca234
CPackedStore: Improve symbol naming
2023-04-05 20:09:23 +02:00