Guild icon
DDraceNetwork
Development / bugs
Report client & server bugs, especially but not limited to release candidates.
Between 2023-12-05 00:00:00Z and 2023-12-06 00:00:00Z
Avatar
Avatar
Ryozuki
luckily the kernel doesnt enforce null terminated strings so far
linux does that pretty much everywhere 😮 e.g. everything related to file system paths
Avatar
Avatar
heinrich5991
linux does that pretty much everywhere 😮 e.g. everything related to file system paths
you sure? i did call sys open without a null terminated path xd
08:49
the syscall
08:50
not the libc wrapper
08:51
It uses strncpy_from_user to do this and uses PATH_MAX as the maximum length. So even the linux kernel does rely on the fact that there is a null terminator in the string. So your assumption on omitting the null terminator is wrong, BUT there's another flaw in this. The length of the string can be less than four bytes.
08:51
big f
08:52
0x12 on Sept 8, 2011 | next [–]
It uses strncpy_from_user to do this and uses PATH_MAX as the maximum length. So even the linux kernel does rely on the fact that there is a null terminator in the string.
08:52
xd
08:52
exDM69
Out of curiosity, I checked out how the open syscall in linux works (see fs/open.c). It uses getname (from fs/namei.h), which effectively copies the filename from userland memory to a chunk of kernel memory. It uses strncpy_from_user to do this and uses PATH_MAX as the maximum length. So even the linux kernel does rely on the fact that there is ...
Avatar
Avatar
Ryozuki
you sure? i did call sys open without a null terminated path xd
yes
11:15
then your program is buggy, works by accident
Avatar
map editor I noticed a few times that the grabber doesnt save-... its weird
18:46
maybe its just me idk
Avatar
Avatar
ExeCode
maybe its just me idk
If your map big size or big map . Save works longer and if you quit to fast it doesn't change
Exported 14 message(s)