mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
Check return value of SDL_small_alloc()
Fixes https://github.com/libsdl-org/SDL/issues/8959
This commit is contained in:
parent
d7be7fc168
commit
1cc85c912b
9 changed files with 22 additions and 55 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue