mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-15 15:58:13 +00:00
Check return value of SDL_small_alloc()
Fixes https://github.com/libsdl-org/SDL/issues/8959
This commit is contained in:
@@ -3578,8 +3578,7 @@ bool SDL_RenderLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count
|
||||
bool isstack1;
|
||||
bool isstack2;
|
||||
float *xy = SDL_small_alloc(float, 4 * 2 * count, &isstack1);
|
||||
int *indices = SDL_small_alloc(int,
|
||||
(4) * 3 * (count - 1) + (2) * 3 * (count), &isstack2);
|
||||
int *indices = SDL_small_alloc(int, (4) * 3 * (count - 1) + (2) * 3 * (count), &isstack2);
|
||||
|
||||
if (xy && indices) {
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user