change parameter type to match CURL lib
(prevents crash on HTTP download)
example
test server:
q2.bot.nu:27912
server config:
set sv_downloadserver "https://quake2.pages.dev/"
map DEBEQUA2
Client connects, and three files added to queue:
HTTP download: /.filelist - Queued
HTTP download: /maps/DEBEQUA2.filelist - Queued
HTTP download: maps/DEBEQUA2.bsp - Queued
from URL:
https://quake2.pages.dev/.filelist - no file
https://quake2.pages.dev/maps/DEBEQUA2.filelist - no file
https://quake2.pages.dev/maps/DEBEQUA2.bsp - exists
when 404 response received for '.filelist' file,
CL_HTTP_Recv() is called and uses wrong file length in malloc()
one of tests:
==43024==ERROR: AddressSanitizer: requested allocation size 0x8000000000000000 (0x8000000000001000 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
1 0x55555566b023 in CL_HTTP_Recv src/client/curl/download.c:98
2 0x7fffcbcc257a (/lib/x86_64-linux-gnu/libcurl.so.4+0x5157a)
when empty filelist downloaded from HTTP server,
CL_ParseFileList() uses unallocated buffer for strchr()
segfault happens:
0 __strchr_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:65
1 0x00007ffff743de2c in __interceptor_strchr (s=0x0, c=<optimized out>)
at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:705
2 0x000055555566d7f8 in CL_ParseFileList (dl=0x55555587a178 <cls+20984>)
at src/client/curl/download.c:484
3 0x000055555566e26c in CL_FinishHTTPDownload ()
at src/client/curl/download.c:670
These are two problems breaking the window flags for renderers which
don't use OpenGL or enforce their own flags:
* In SDL 3 the window flags were increased from 32 bit to 64 bit. SDL
3.1.3 introduced a new type SDL_WindowFlags for them. Use it to
represent the window flags. This is currently a noop, becaue SDL 3
doesn't have any flags above 32 bit yet. This might require another
breakage of the renderer API in the future, because currently
renderers pass a 32 bit flags thing to the client.
* `SDL_SetNumberProperty()` got a new type
`SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER` to represent the flags. It must
be used, otherwise strange things happen.
Closes#1156.
Now also available in GL1. Includes a call to glClear at the beginning
of each frame, pointing to the same buffers that are discarded at the
end. When value is 1, operates over color, depth and stencil buffers.
When it's 2, only does depth and stencil, ignoring color. These
changes provide a performance improvement on mobile/embedded.
912b65ff74 changed mode `3` from random
playback to truly random playback, allowing the same track being played
several times in a row. Since some users might prefer the old behavior
move truly random playback to a new mode `4`. Add it to the menu and
finally document the `ogg_shuffle` cvar.
In addition to #1143
Otherwise we might end up in situations were `OGG_SaveState()` writes
invalid values into the state struct and `OGG_ResumeState()` tries to
recover theses values into an uninitialized stb_vorbis state. This may
lead to NULL pointers in stb_vorbis and other problems.
Closes#1135.