7 Commits
Author SHA1 Message Date
akashdeshmukh-git debc1f6b1f [rcore] Fix GetFileExtension() returning the name of hidden files in a directory (#6326)
Since the extension is searched in the file name only, the check for
a leading dot must compare against the file name rather than the full
path: "assets/.gitignore" returned ".gitignore" while ".gitignore"
returned NULL.
2026-10-25 10:03:51 +01:00
akashdeshmukh-git eb8cb1beb8 [raudio] Check input data before loading Wave or Music from memory (#6324) 2026-10-24 10:56:06 +02:00
akashdeshmukh-git b9758a6403 [rtextures] Fix QOI loading reading past the end of short file data (#6245)
LoadImageFromMemory() passed fileData[12] (the channels byte of the QOI
header) to qoi_decode() as the requested channel count, reading it before
qoi_decode() checks the data size. Data shorter than 13 bytes made it read
past the end of the buffer.

Pass 0 instead, so qoi_decode() uses the channel count from the header after
checking the size. For valid files this gives the same result, since the
value passed was that same header byte.
2026-10-16 10:09:45 +02:00
akashdeshmukh-git 9056ea3299 [examples] core_input_gestures_testbed: fix out-of-bounds log read (#6238)
gestureLogIndex started at GESTURE_LOG_SIZE, and the log drawing loop
starts reading at that index, so gestureLog[GESTURE_LOG_SIZE] (one past
the end) was read every frame until the first gesture was logged.
Start the index at 0 instead. Logging is unchanged: the first logged
gesture still wraps to GESTURE_LOG_SIZE - 1.
2026-10-09 00:57:48 +02:00
akashdeshmukh-git 806d68a9bc [examples] audio_stream_callback: fix out-of-bounds read in waveform drawing (#6237)
The waveform loop draws a line from sample i to sample i + 1 for every
x in [0, screenWidth). For the last x, the end point index works out to
SAMPLE_RATE, one past the end of buffer[SAMPLE_RATE]. Stop the loop one
pixel earlier so the last segment ends on the final sample.
2026-10-09 00:56:35 +02:00
akashdeshmukh-git 3825bbf2d4 [raudio] LoadSoundAlias(): check source buffer before use (#6236)
If the source sound failed to load (for example when no audio
playback device could be initialized), its stream.buffer is NULL and
LoadSoundAlias() dereferenced it. Check the buffer first, like
UnloadSoundAlias() and IsSoundValid() already do, so an empty Sound
is returned instead of crashing.

Seen with examples/audio/audio_sound_multi (reported in #5664).
2026-10-09 00:55:47 +02:00
akashdeshmukh-git a043255aa7 [examples] models_animation_blending: avoid crash when animations fail to load (#6234)
If resources/models/gltf/robot.glb can't be found (e.g. the example is
run from another working directory), LoadModelAnimations() returns NULL
with animCount = 0 and the example indexed anims[] in the update loop
and in the timeline drawing, crashing. Skip both when no animations
were loaded, so it just logs the usual load warnings.

Reported in #5664.
2026-10-08 15:33:10 +02:00