version 1.1, 2015/04/20 18:19:55
|
version 1.2, 2015/09/25 20:24:20
|
|
|
#include "intlstr.h" | #include "intlstr.h" |
| |
#include <assert.h> | #include <assert.h> |
|
#include <pal/intsafe.h> |
| |
#if defined(_MSC_VER) | #if defined(_MSC_VER) |
| |
|
|
return NULL; | return NULL; |
} | } |
| |
bucket = (IntlstrBucket*) PAL_Malloc(sizeof(IntlstrBucket) + sizeof(wchar_t) * wcharCount); |
size_t allocSize = 0; |
|
if (SizeTMult(sizeof(wchar_t), wcharCount, &allocSize) != S_OK || |
|
SizeTAdd(allocSize, sizeof(IntlstrBucket), &allocSize != S_OK)) |
|
{ |
|
return NULL; |
|
} |
|
|
|
bucket = (IntlstrBucket*) PAL_Malloc(allocSize); |
if (!bucket) | if (!bucket) |
{ | { |
/* TODO/FIXME - OI diagnostics */ | /* TODO/FIXME - OI diagnostics */ |