Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2021-04-17 00:00:00Z and 2021-04-18 00:00:00Z
Avatar
aah google shit mod
00:32
that I leaked to trigger valinoob
Avatar
Yaay, intellectual property theft \o/ 😄
Avatar
well that's what happens when u ddos my old srv
14:40
leak private source code
Avatar
that's obviously not legal
Avatar
Tested this on a DDNet server, both with names with spaces and commands without arguments. One issue with this is as @heinrich5991 mentioned arguments containing ". I'm not completely sure how best to handle this. I think r should just do no further processing and give the rest of the string, but I think we should talk about it before making a change like that. Close #2858
Avatar
In file included from /usr/include/string.h:495, from /home/runner/work/teeworlds/teeworlds/src/base/system.c:6: In function ‘strncpy’, inlined from ‘fs_makedir_recursive’ at /home/runner/work/teeworlds/teeworlds/src/base/system.c:2047:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 2048 equals destination size [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14:58
huh @Learath2
14:58
C++ error messages are joy
Avatar
I think this is a compiler error, we had these in ddnet too
15:07
I dug into the gcc source even, but I couldn't really figure out why it's convinced the bounds are off
Avatar
they think it shouldn't pass the destination length because doign that does not ensure null termination
15:13
our code it fine but it triggers the heuristic for bad code
15:14
one possible fix is passing the length - 1 from str_copy to strncpy
Avatar
@Dune do you perchance remember why you had MODIFIER_NONE? (edited)
15:24
Mask == 0 would imply MODIFIER_NONE just aswell (edited)
Avatar
I don't remember quite, should look into the code
15:41
there could be a good reason and there could be no reason
15:42
wait, MODIFIER_NONE is 0
15:42
so it implies Mask == 0, it's just cosmetic @Learath2
15:43
it also ensures enum { BIND_LENGTH=128, MODIFIER_NONE=0, MODIFIER_SHIFT, MODIFIER_CTRL, MODIFIER_ALT,
15:43
that SHIFT CTRL ALT are 1 2 3
15:43
and not 130 131 132
Avatar
but you use 1 << MODIFIER_NONE as mask, creating a special case since binds without modifiers are stored at the 0th index
Avatar
the most likely reason to me is no reason 😛
15:48
if there are binds stored with 0, and others stored with 1 << MODIFIER_NONE, it's a bug (edited)
Exported 27 message(s)