NuxiNL / cloudlibc

CloudABI's standard C library
BSD 2-Clause "Simplified" License
295 stars 17 forks source link

storage size for language name too short in newlocale.c #36

Open sdalu opened 4 years ago

sdalu commented 4 years ago

I think, it should be 6, as with 5 the terminating nul char is not taken into account in string like "fr_FR" https://github.com/NuxiNL/cloudlibc/blob/33041bfd4dee555afc89a1f5c2e55eb5f70f1e6c/src/libc/locale/newlocale.c#L34

which would be fine if it wasn't checked for it https://github.com/NuxiNL/cloudlibc/blob/33041bfd4dee555afc89a1f5c2e55eb5f70f1e6c/src/libc/locale/newlocale.c#L84