Print this page
locale stuff should use libc safe lmalloc. Other fixes from tests.
*** 42,51 ****
--- 42,52 ----
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
+ #include "libc.h"
#include "runetype.h"
#include "runefile.h"
_RuneLocale *
_Read_RuneMagi(const char *fname)
*** 137,147 ****
}
/*
* Convert from disk format to host format.
*/
! data = malloc(sizeof (_RuneLocale) +
(frl->runetype_ext_nranges + frl->maplower_ext_nranges +
frl->mapupper_ext_nranges) * sizeof (_RuneEntry) +
runetype_ext_len * sizeof (*rr->__types) +
frl->variable_len);
if (data == NULL) {
--- 138,148 ----
}
/*
* Convert from disk format to host format.
*/
! data = libc_malloc(sizeof (_RuneLocale) +
(frl->runetype_ext_nranges + frl->maplower_ext_nranges +
frl->mapupper_ext_nranges) * sizeof (_RuneEntry) +
runetype_ext_len * sizeof (*rr->__types) +
frl->variable_len);
if (data == NULL) {