mirror of
https://github.com/openjdk/jdk8u.git
synced 2025-12-12 00:34:09 -06:00
8297371: Improve UTF8 representation redux
Reviewed-by: yan, andrew Backport-of: a44eb133d3cdb190abb0210c201e315d94d09dc7
This commit is contained in:
parent
6089a4fcc5
commit
ed70f64af9
@ -23,6 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -33,8 +34,13 @@
|
||||
* such as "z:" need to be appended with a "." so we
|
||||
* must allocate at least 4 bytes to allow room for
|
||||
* this expansion. See 4235353 for details.
|
||||
* This macro returns NULL if the requested size is
|
||||
* negative, or the size is INT_MAX as the macro adds 1
|
||||
* that overflows into negative value.
|
||||
*/
|
||||
#define MALLOC_MIN4(len) ((char *)malloc((len) + 1 < 4 ? 4 : (len) + 1))
|
||||
#define MALLOC_MIN4(len) ((unsigned)(len) >= INT_MAX ? \
|
||||
NULL : \
|
||||
((char *)malloc((len) + 1 < 4 ? 4 : (len) + 1)))
|
||||
|
||||
/**
|
||||
* Throw a Java exception by name. Similar to SignalError.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user