File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 44
55 Noteworthy changes compared to the previous release, 9.2.0:
66
7+ Bug fixes:
8+ - Fix potential buffer overflow bug with our stb_image support code.
9+
710 Miscellaneous:
811 - Dynamically allocate volume index instead of relying on a hard coded
912 limit and a fixed allocation. This fixes potential panics or failure
Original file line number Diff line number Diff line change 66
77+ #include <stddef.h>
88+ #include <lib/libc.h>
9+ + #include <lib/misc.h>
910+ #include <mm/pmm.h>
1011+
1112+ #define STBI_ASSERT(x)
3435+ void *STBI_REALLOC_buf = (x); \
3536+ size_t STBI_REALLOC_alloc_size = (y); \
3637+ void *STBI_REALLOC_new_buf = STBI_MALLOC(STBI_REALLOC_alloc_size); \
38+ + size_t STBI_REALLOC_old_size = *(size_t *)((void *)STBI_REALLOC_buf - 16); \
3739+ if (STBI_REALLOC_buf != NULL) { \
38- + memcpy(STBI_REALLOC_new_buf, STBI_REALLOC_buf, STBI_REALLOC_alloc_size); \
40+ + memcpy(STBI_REALLOC_new_buf, STBI_REALLOC_buf, \
41+ + MIN(STBI_REALLOC_alloc_size, STBI_REALLOC_old_size)); \
3942+ STBI_FREE(STBI_REALLOC_buf); \
4043+ } \
4144+ STBI_REALLOC_new_buf; \
4548+ #define STBI_NO_STDIO
4649+ #define STBI_NO_SIMD
4750+ #define STBI_NO_LINEAR
48- +
49- +
50- +
5151+ #define STBI_ONLY_JPEG
5252+ #define STBI_ONLY_PNG
5353+ #define STBI_ONLY_BMP
You can’t perform that action at this time.
0 commit comments