ddnet/src/engine
bors[bot] 8d61322ca3
Merge #4788
4788: Add size checks to CVariableInt::Pack and ::Unpack, refactoring r=def- a=Robyt3

- Refactor `CVariableInt::Pack` some more according to upstream:
   - avoid right shift of negative number
   - rewrite loop smarter
- Add size parameters to `CVariableInt::Pack` and `CVariableInt::Unpack`. Adjust tests and add tests with too small buffer sizes.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [X] Written a unit test if it works standalone, system.c especially
- [X] Considered possible null pointers and out of bounds array indexing
- [X] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-03-05 22:15:56 +00:00
..
client Merge #4783 2022-03-05 21:59:57 +00:00
docs Fix a woopsie in snapshot docs 2021-05-29 11:07:33 +02:00
external Fix serverinfo json parser to work with system libjsonparser (fixes #4202) 2021-11-17 18:26:16 +01:00
server Move NETSOCKET behind a pointer so it can grow 2022-03-04 19:33:06 +01:00
shared Merge #4788 2022-03-05 22:15:56 +00:00
antibot.h Forgot to add target here 2021-07-22 00:22:12 +02:00
client.h Show correct server address when connecting 2022-02-28 19:38:59 +01:00
config.h Implement "reset" command 2021-12-27 01:13:11 +01:00
console.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
demo.h add functions for packing/unpacking int/unsigned using char arrays 2021-11-09 22:19:32 +01:00
discord.h Put the Discord stuff into its own file 2021-01-31 10:17:21 +01:00
editor.h Adopt upstream refactoring: Mark several functions as 'const' 2021-02-23 18:26:16 +03:00
engine.h Add serverbrowser ping cache 2021-05-14 01:00:41 +02:00
friends.h Run clang-format 2020-09-26 21:50:15 +02:00
ghost.h Update ghost format to v6: Replace CRC with SHA256 2020-10-14 17:08:58 +02:00
graphics.h CheckImageFormatRGBA --> IsImageFormatRGBA 2022-02-23 00:39:31 +01:00
input.h change type of MouseDoubleClick from int to bool 2022-01-16 12:43:32 +01:00
kernel.h Run clang-format 2020-09-26 21:50:15 +02:00
keys.h Use scancodes instead of keycodes for input (fixes #796, please test) 2017-07-21 19:53:49 +02:00
map.h Run clang-format 2020-09-26 21:50:15 +02:00
masterserver.h Adopt upstream refactoring: Mark several functions as 'const' 2021-02-23 18:26:16 +03:00
message.h Run clang-format 2020-09-26 21:50:15 +02:00
server.h Don't try to send messages outside of sv_max_clients (fixes# 4750) 2022-02-21 16:33:53 +01:00
serverbrowser.h Support 128 players in serverbrowser 2022-01-02 13:41:59 +01:00
sound.h Modulize skins, particles, emoticons and game 2020-10-09 09:07:19 +02:00
sqlite.h Add sqlite3 to the client 2021-05-14 01:00:41 +02:00
steam.h Allow joining and inviting others via Steam friend list while ingame 2020-09-06 17:08:38 +02:00
storage.h Add IStorage::FormatTmpPath static method 2021-12-20 16:12:15 +01:00
textrender.h Use ETextAlignment enum for UI 2022-01-21 16:26:19 +01:00
updater.h Overhauled job system 2017-11-23 15:47:38 +01:00
uuid.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
warning.h Add block list for drivers 2020-11-05 21:07:14 +01:00