mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibC: Use a sensible MB_CUR_MAX
value
We always use UTF-8, meaning that a single `wchar_t` might be converted into up to 4 `char`s. This would cause a buffer overflow if something actually relied on this being the right value.
This commit is contained in:
parent
ba975f4ba4
commit
b3ac24a939
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ __BEGIN_DECLS
|
|||
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
#define MB_CUR_MAX 1
|
||||
#define MB_CUR_MAX 4
|
||||
|
||||
__attribute__((malloc)) __attribute__((alloc_size(1))) void* malloc(size_t);
|
||||
__attribute__((malloc)) __attribute__((alloc_size(1, 2))) void* calloc(size_t nmemb, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue