Alibek Omarov
e5c4e49782
engine: client: introduce cookie protocol extension, when client connects to the server, it provides randomized 64-bit value to be prefixed into netchan messages
...
* Prevent clientuseragent from leaking data.
* Process qport in netchan, cleaning up code
2026-05-26 02:14:58 +05:00
Alibek Omarov
d61983a5d2
engine: randomize outgoing_sequence on server side
2026-05-26 02:14:58 +05:00
Alibek Omarov
c3f4eb026b
engine: only allow net_sequence_window packets, prevent sudden, usually impossible, jumps
2026-05-26 02:14:58 +05:00
SNMetamorph
fe9b8bcaca
engine: enable warning when client or server tries to access non-existent cvar
2026-05-25 13:44:26 +05:00
Alibek Omarov
eb9de1cac8
engine: fix NET_IsReservedAdr checks for IPv6, treat IPv4-mapped-as-IPv6 as IPv4
2026-05-23 21:23:10 +05:00
Alibek Omarov
24abd2deb2
engine: host: improve missing game libraries message so it's easier to understand
2026-05-23 21:23:10 +05:00
Alibek Omarov
996dcc637d
engine: tighten file fragment msg by the (possibly) trunctated frag_message
2026-05-23 21:23:10 +05:00
Alibek Omarov
8b89bdca6f
engine: validate size of the message before passing it to COM_UnMunge2
2026-05-23 21:23:10 +05:00
Alibek Omarov
3a6e3ba3ca
engine: change Xash split packet id to unsigned short, as it never should be negative
2026-05-23 21:23:10 +05:00
Alibek Omarov
42ab099a07
engine: check server address if client received split packet
2026-05-23 21:23:10 +05:00
Alibek Omarov
09f15042fe
engine: add target buffer size argument to MSG_ReadBits and MSG_ReadBytes
2026-05-23 21:23:10 +05:00
Alibek Omarov
25ca2ecb12
engine: fix Netchan_Validate units bug allowing oversized fragments
2026-05-23 03:12:23 +05:00
Alibek Omarov
f6b28e32e2
engine: fix use-after-free in Netchan_CopyNormalFragments on decompression failure; reject oversized fragmented messages.
2026-05-23 02:53:26 +05:00
Alibek Omarov
e118376735
engine: take total size to decompressors in Netchan_CopyNormalFragments, fix underflow when decompressing bzip2 stream
2026-05-23 02:42:28 +05:00
Alibek Omarov
5ef6123f03
engine: append log to the crash log on Android
2026-05-22 18:47:31 +05:00
SNMetamorph
2a284090ef
engine: common: add console command "fs_find"
2026-05-21 02:45:27 +05:00
Alibek Omarov
3e24d5a347
engine: use vector initializer macros
2026-05-20 23:24:36 +05:00
Alibek Omarov
64be4251c8
engine: use designated initializers where possible
2026-05-20 23:24:36 +05:00
Alibek Omarov
c6c1163aa0
engine: common: refactor variable declarations
2026-05-20 23:24:36 +05:00
a1batross
4c2302ec6c
engine: pass customization file fragments into IsSafeFileToDownload
...
This function already validates customization filenames.
2026-05-20 01:03:03 +05:00
Alibek Omarov
334bebb1fb
engine: use memcpy when reading sprite model to avoid unaligned access
2026-05-17 12:34:21 +05:00
Alibek Omarov
fe2019ee06
engine: common: add more cases to COM_IsSafeToDownload
2026-05-17 11:20:00 +05:00
Alibek Omarov
9d050e7ed3
engine: limit decompressed buffer alloc size to 64MiB
2026-05-17 11:17:23 +05:00
Alibek Omarov
be35b3503e
engine: limit maximum amount of pending fragbufs
2026-05-17 10:54:51 +05:00
Alibek Omarov
9082a47348
engine: validate paths before downloading
2026-05-17 10:41:59 +05:00
Alibek Omarov
8120669e5b
engine: restore bounds check in Delta_FindStructByIndex, as it gets passed arbitrary numbers too
2026-05-16 21:27:51 +05:00
Alibek Omarov
fb6c4a224c
engine: check for overflow in split packet reassembly
2026-05-16 21:13:47 +05:00
Alibek Omarov
166763a887
engine: common: limit amount of delta encoded fields by 64 in GoldSrc protocol (because this is the maximum it allows anyway)
2026-05-16 21:12:49 +05:00
Alibek Omarov
d305292340
engine: zone: in CheckAlloc walk through over both allocation chains, so that we don't read out of bounds if passed pointer is not allocated by zone allocator
2026-05-16 12:56:49 +05:00
Alibek Omarov
9ee6be87d7
engine: host: try to avoid recursive Host_Error
2026-05-16 12:37:08 +05:00
Alibek Omarov
4e4a54ab68
engine: despite byte-swapping code is no-op on little endian, it still fires and can read out of bounds on some models, leading to crash
2026-05-16 12:21:46 +05:00
Владислав Сухов
c6fb702fb1
engine: add MenuFactory native object
2026-05-15 08:48:58 +05:00
Alibek Omarov
ff8efebba2
engine: fix more warnings
2026-05-13 10:46:44 +05:00
Alibek Omarov
2dc132f817
engine: common: fix up warnings, clean up unused variables
2026-05-13 10:13:52 +05:00
Alibek Omarov
0aac2e4d32
engine: zone: add small allocation optimization, reducing the size of <255 bytes allocations at the cost of less debug info
...
Keep it opt-in through a flag at pool alloc time.
Opt-in console related allocations, they are usually small enough strings.
2026-05-13 09:32:50 +05:00
Alibek Omarov
881f0c5ca7
engine: show the missing library warning message on Android, but only if APK doesn't try to override it, skip client for now
2026-05-09 16:57:21 +05:00
Zane van Iperen
843f6297ed
engine: net_ws: fix NET_QueuePacket indentation after previous change
2026-05-09 13:15:17 +05:00
Zane van Iperen
d1510345f1
engine: net_ws: round-robin IPv4/IPv6 reads
...
Previously, it would always return on the first one that had activity.
In practice, this meant that if IPv4 starts getting slammed, IPv6 reads
wouldn't happen.
2026-05-09 13:15:17 +05:00
Alibek Omarov
ebeff144f9
Merge remote-tracking branch 'origin/master'
2026-05-07 13:50:55 +05:00
Alibek Omarov
d6bf06e997
engine: common: check XASH3D_BASEDIR when opening log file, fixes engine.log creation on Android
2026-05-07 12:23:56 +05:00
Alibek Omarov
c2df265de7
engine: operate on a local copy of dspriteframe_t to avoid unaligned access on ARMv7
2026-05-07 11:56:08 +05:00
Alibek Omarov
086cb6aab8
engine: move {gamedir}/downloaded directory to {gamedir}_downloads for compatibility
...
Some mods like Sven-Coop 4.8 stupidly open game files directly and need this to
load downloaded soundcache.
2026-05-07 10:32:00 +05:00
Alibek Omarov
fdb59e990e
engine: rename Host_IsLocalGame to Host_IsSinglePlayerGame to avoid confusion
2026-05-05 01:04:57 +05:00
SNMetamorph
2635fd9739
engine: common: make use NET_MakeSocketNonBlocking instead of direct system API functions
2026-05-02 10:50:21 +05:00
SNMetamorph
a707f5933d
engine: common: expose network utilities functions needed for broker
2026-05-02 10:50:21 +05:00
Alibek Omarov
68dba8b4e0
engine: add litwater support
2026-04-28 11:12:11 +05:00
Alibek Omarov
f91e5a7647
engine: explicitly cast chars to bytes in ctype functions
2026-04-28 09:50:33 +05:00
Alibek Omarov
7942d9b1bc
engine: mod_bmodel: refactor unified bmodel loader
...
* Use offsets into dbspmodel_t struct, get rid of srcmodel global variable.
* Allocate dbspmodel_t when it's required
* Make srclumps const, move Blue-Shift hack into lump loader's flag.
2026-04-26 06:29:04 +05:00
Alibek Omarov
2ccef63754
engine: ref_api: change RefGetParm return type to intptr_t, bump RefAPI version
2026-04-26 04:12:52 +05:00
Alibek Omarov
e30ce9c150
engine: fix palette and builtin textures on BE
2026-04-26 04:12:52 +05:00