Commit graph

11807 commits

Author SHA1 Message Date
def 60f4e078b7 Out of bounds access in RenderPlayer
src/game/client/components/players.cpp:197:5: runtime error: index -2 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x56548eec0487 in CPlayers::RenderPlayer(CNetObj_Character const*, CNetObj_Character const*, CTeeRenderInfo const*, int, float) /media/ddnet/src/game/client/components/players.cpp:197:37
    #1 0x56548ec97234 in CGhost::OnRender() /media/ddnet/src/game/client/components/ghost.cpp:344:26
    #2 0x56548ef92b26 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #3 0x56548ea4659e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #4 0x56548ea7b90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #5 0x56548ea9bb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #6 0x7f7c844f1151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #7 0x56548e7e8e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 3d76010fe9 aPastIndecies -> aPastIndices 2020-10-11 16:37:03 +02:00
def 47299e8586 Out of bounds access in CMenus::RenderGame
src/game/client/components/menus_ingame.cpp:108:16: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a64c4 in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:108:73
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/game/client/components/menus_ingame.cpp:108:16 in
src/game/client/components/menus_ingame.cpp:109:14: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a699a in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:109:71
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 346853e817 Signed overflow is undefined in CSnapshot::Crc
src/engine/shared/snapshot.cpp:72:8: runtime error: signed integer overflow: -1297193910 + -1824658838 cannot be represented in type 'int'
    #0 0x565165b0687d in CSnapshot::Crc() /media/ddnet/src/engine/shared/snapshot.cpp:72:8
    #1 0x565165c4d20b in CClient::ProcessServerPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1981:49
    #2 0x565165c5d960 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2589:6
    #3 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
    #4 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #5 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #6 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #7 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def e6b0283722 No null pointer to mem_copy in SendControlMsg
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
    #0 0x565165b348dc in mem_copy /media/ddnet/src/base/system.c:261:2
    #1 0x565165aeb27d in CNetBase::SendControlMsg(NETSOCKET, NETADDR*, int, int, void const*, int, int, bool) /media/ddnet/src/engine/shared/network.cpp:313:2
    #2 0x565165aeeb4e in CNetConnection::SendControl(int, void const*, int) /media/ddnet/src/engine/shared/network_conn.cpp:169:2
    #3 0x565165af08c5 in CNetConnection::Feed(CNetPacketConstruct*, NETADDR*, int) /media/ddnet/src/engine/shared/network_conn.cpp:367:6
    #4 0x565165aec7d2 in CNetClient::Recv(CNetChunk*) /media/ddnet/src/engine/shared/network_client.cpp:94:174
    #5 0x565165c5d5ea in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2571:24
    #6 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
    #7 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #8 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 7e297aff59 Don't pass null pointer into mem_copy in CServerBrowser
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
    #0 0x5651235308dc in mem_copy /media/ddnet/src/base/system.c:261:2
    #1 0x56512375218d in CServerBrowser::Add(NETADDR const&) /media/ddnet/src/engine/client/serverbrowser.cpp:503:3
    #2 0x565123752f6a in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:548:13
    #3 0x5651237564cb in CServerBrowser::Refresh(int) /media/ddnet/src/engine/client/serverbrowser.cpp:705:6
    #4 0x5651239a32f8 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1164:21
    #5 0x5651239bd331 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #6 0x565123b878f6 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #7 0x56512363b5ee in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #8 0x56512367095f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #9 0x565123690b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #10 0x7fa8487e8151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #11 0x5651233dde0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def f94d476cf2 Don't divide by 0 in LoadSkin
src/game/client/components/skins.cpp:142:14: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55b6bd0f49e1 in CSkins::LoadSkin(char const*, char const*, int, int*) /media/ddnet/src/game/client/components/skins.cpp:142:14
    #1 0x55b6bd0f0942 in CSkins::SkinScan(char const*, int, int, void*) /media/ddnet/src/game/client/components/skins.cpp:55:16
    #2 0x55b6bcb33928 in fs_listdir /media/ddnet/src/base/system.c:2033:6
    #3 0x55b6bcb04024 in CStorage::ListDirectory(int, char const*, int (*)(char const*, int, int, void*), void*) /media/ddnet/src/engine/shared/storage.cpp:316:5
    #4 0x55b6bd0f9e2f in CSkins::Refresh() /media/ddnet/src/game/client/components/skins.cpp:222:13
    #5 0x55b6bd0f6e33 in CSkins::OnInit() /media/ddnet/src/game/client/components/skins.cpp:194:2
    #6 0x55b6bd14c63f in CGameClient::OnInit() /media/ddnet/src/game/client/gameclient.cpp:322:28
    #7 0x55b6bcc5f9f8 in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3089:16
    #8 0x55b6bcc84b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7f1144ded151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55b6bc9d1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 612f665a6e Document highest and lowest values for cl_video_crf 2020-10-11 16:29:39 +02:00
bors[bot] d4a0105d40
Merge #3065
3065: Make clan plates fit & only show when name plates enabled r=heinrich5991 a=def-

Old:
![screenshot_2020-10-11_17-25-22](https://user-images.githubusercontent.com/2335377/95681099-4b5d8f00-0bde-11eb-9d90-bc6ee9a8729a.png)
New:
![screenshot-20201011@162337](https://user-images.githubusercontent.com/2335377/95681092-3b45af80-0bde-11eb-848c-2a4d14c40252.png)
Thanks to HamidReza for report


Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:29:15 +00:00
heinrich5991 a2b3f45f8b Reintroduce CMDFLAG_TEST
Add some more helpful messages for executing test/game commands.
2020-10-11 16:27:28 +02:00
def b7c8da54a3 Make clan plates fit & only show when name plates enabled
Thanks to HamidReza for report
2020-10-11 16:24:01 +02:00
Andrii 26a07c804f Disallow game-related commands unless testing is enabled 2020-10-11 16:02:10 +02:00
bors[bot] a83b7b0733
Merge #2986
2986: Try to fix FindSQLite3.cmake r=heinrich5991 a=def-

For @panos' Haiku port: https://github.com/panos/ddnet

> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake files:
> /boot/home/ddnet/SQLite3_INCLUDEDIR

@heinrich5991 thoughts?

Co-authored-by: def <dennis@felsin9.de>
2020-10-11 13:15:21 +00:00
bors[bot] 1a79fdec82
Merge #3053
3053: Optimize uuid lookup r=heinrich5991 a=Jupeyy

Already wrote that patch when i noticed its not about this, maybe we can use it, else nvm

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-11 13:07:36 +00:00
bors[bot] 6ab806fde8
Merge #3048 #3063
3048: Add GUI & Game sound volume sliders r=heinrich5991 a=def-

As requested by Pipou

3063: increase buffer size for name_ban messages r=heinrich5991 a=12pm

otherwise reason can be cut off

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-10-11 13:00:23 +00:00
bors[bot] 247e01bffb
Merge #3064
3064: Update demo browser on demo save r=heinrich5991 a=BannZay

Fixes #3062

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-10-11 12:53:02 +00:00
Andrii 52efb23545 Update demo browser on demo save 2020-10-11 15:45:31 +03:00
12pm e34acce0cd increase buffer size for name_ban messages 2020-10-11 14:25:31 +02:00
bors[bot] 692c37398e
Merge #3058
3058: Always clear first frame r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-11 09:34:55 +00:00
bors[bot] e44df2d136
Merge #3059
3059: Add box offset to align better on spec tab r=def- a=ardadem

Old:
![2020-10-11-12:07:54-screenshot](https://user-images.githubusercontent.com/13207692/95674696-91a0f700-0bba-11eb-8291-275cc263b6c1.png)

New:
![2020-10-11-12:08:36-screenshot](https://user-images.githubusercontent.com/13207692/95674697-92d22400-0bba-11eb-8b60-36f0d85fbae4.png)

Very small visual change but heart fits better now for >32 players.

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-11 09:15:25 +00:00
Jupeyy 008800d30d Always clear first frame 2020-10-11 11:13:31 +02:00
def 4327194d27 Add GUI & Game sound volume sliders
As requested by Pipou
2020-10-11 10:16:38 +02:00
def 284c287c99 Version 15.1.1 2020-10-11 10:14:21 +02:00
Jupeyy 9e8cbfea5d Optimize uuid lookup 2020-10-11 08:39:29 +02:00
bors[bot] 27c047aa6c
Merge #3007
3007: Update winter_main.rules by mind r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 00:33:38 +00:00
bors[bot] a68fca6d7c
Merge #3036
3036: Consider as not-afk on emoticon, chat, vote, r=heinrich5991 a=def-

call vote, spectator mode, info change

Co-authored-by: def <dennis@felsin9.de>
2020-10-11 00:26:30 +00:00
bors[bot] 1356fb30a9
Merge #3055
3055: Add back Australia... r=heinrich5991 a=def-

I feel like a quick 15.1.1 release is in order...

Co-authored-by: def <dennis@felsin9.de>
2020-10-10 23:14:49 +00:00
def 7dc33abe23 Add back Australia... 2020-10-11 01:00:56 +02:00
def ef9c85c343 Update 15.1 release date 2020-10-11 00:00:40 +02:00
def 507f7f6085 Version 15.1 2020-10-11 00:00:33 +02:00
bors[bot] 80ee8ff823
Merge #3052
3052: Fix virtual call in Constructor r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-10 10:34:41 +00:00
Jupeyy 58bd8dcbb6 Fix virtual call in Constructor 2020-10-10 12:16:27 +02:00
bors[bot] 9d39e1da6d
Merge #3046
3046: Remove usages of qsort r=def- a=Learath2

Caught my eye while doing the integrity PR.

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-10 08:38:12 +00:00
Learath2 d8c9a71e18 Remove usages of qsort 2020-10-10 01:18:42 +02:00
bors[bot] 2917681bf5
Merge #3047
3047: Fix ui_page/ui_settings_page ranges r=Learath2 a=def-

For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 23:16:51 +00:00
def 10e7b2ed7b Fix ui_page/ui_settings_page ranges
For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered
2020-10-09 22:51:16 +02:00
bors[bot] 598a686c36
Merge #3045
3045: Use 0.7 gameskin by @Zatline r=def- a=Jupeyy

a5105264ff
db08239506
31c6d2684d

Wtf is clang-format doing in line 257 xD (will just use clang-format-10 for now to fix it)

dunno if github can close prs
closes #2921

and ty to @ChillerDragon for the initial commit,

game.png is dilated, and optimized.

So i guess we wait for #2754 ?

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2020-10-09 20:44:08 +00:00
Arda Demir 75cd653f4c Add box offset to align better on spec tab 2020-10-09 22:14:54 +03:00
ChillerDragon 263fdbd8e1 Use 0.7 gameskin by @Zatline
a5105264ff
db08239506
31c6d2684d
2020-10-09 21:04:06 +02:00
bors[bot] f93c8e4fdb
Merge #2987
2987: Modulize skins, particles, emoticons and game r=def- a=Jupeyy

fixes #2203 

Puh, something i always wanted todo.
Need to error read, bcs alot of copy paste.

Modulizes all images, so that all images are mipmap indepedent, without texeloffset problems

I also added the ninja bar analyzer for #2921


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 15:20:48 +00:00
bors[bot] ce9ba5ec09
Merge #3018
3018: Editor: Improve usability of server settings r=Jupeyy a=def-

- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 14:48:59 +00:00
def ea8bee4d34 Focus command field when something changed 2020-10-09 16:40:59 +02:00
bors[bot] b208ee3a81
Merge #3039
3039: Show friends on spectate tab r=def- a=ardadem

![2020-10-08-13:22:48-screenshot](https://user-images.githubusercontent.com/13207692/95447050-d5e98880-0969-11eb-923a-2b647933774d.png)
![2020-10-08-13:23:14-screenshot](https://user-images.githubusercontent.com/13207692/95447054-d71ab580-0969-11eb-8ace-a893cfa80a97.png)

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-09 14:38:12 +00:00
bors[bot] cf6ace1744
Merge #3022
3022: Text alignment r=def- a=Jupeyy

i think the round borders create a bit of optical illusion, e.g. the "V" in edtior is only 1 pixel of, but looks like its completly left xd

i checked at few resolutions with gimp and only saw around 1 pixel margin of error, but go ahead and test yourself :D

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 14:31:25 +00:00
Jupeyy 8d6148b20b Modulize skins, particles, emoticons and game 2020-10-09 09:07:19 +02:00
bors[bot] 0d581c454e
Merge #3042
3042: Use renderinfo for player death effect r=def- a=Jupeyy

the render info color is created the same way, just that it is allowed to be overritten for team colors
see OnNewSnapshot
and UpdateRenderInfo

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 20:42:48 +00:00
Jupeyy 94a20d11fa Use renderinfo for player death effect 2020-10-08 21:54:53 +02:00
bors[bot] b2b3b866cd
Merge #3040
3040: Revert "Reset m_ServerCapabilities on Disconnect" r=def- a=heinrich5991

This reverts commit a6d2a35e11.

It's unclear how this should have fixed the mentioned bug.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-08 11:30:10 +00:00
heinrich5991 eb4699de2c Revert "Reset m_ServerCapabilities on Disconnect"
This reverts commit a6d2a35e11.

It's unclear how this should have fixed the mentioned bug.
2020-10-08 13:12:31 +02:00
Arda Demir 84c36b3423 Show friends on spectate tab 2020-10-08 13:25:05 +03:00