mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Limit JSString length to 28 bits on 64-bit platforms (bug 513348, r=brendan).
This commit is contained in:
parent
0d45861f13
commit
647db183ee
@ -78,6 +78,9 @@
|
||||
|
||||
#define JSSTRDEP_RECURSION_LIMIT 100
|
||||
|
||||
JS_STATIC_ASSERT(size_t(JSString::MAX_LENGTH) <= size_t(JSVAL_INT_MAX));
|
||||
JS_STATIC_ASSERT(INT_FITS_IN_JSVAL(JSString::MAX_LENGTH));
|
||||
|
||||
static JS_ALWAYS_INLINE JSBool
|
||||
UWordInRootedValue(JSContext *cx, size_t i, jsval *vp)
|
||||
{
|
||||
|
@ -142,7 +142,11 @@ struct JSString {
|
||||
ATOMIZED = JSSTRING_BIT(JS_BITS_PER_WORD - 3),
|
||||
DEFLATED = JSSTRING_BIT(JS_BITS_PER_WORD - 4),
|
||||
|
||||
#if JS_BITS_PER_WORD > 32
|
||||
LENGTH_BITS = 28,
|
||||
#else
|
||||
LENGTH_BITS = JS_BITS_PER_WORD - 4,
|
||||
#endif
|
||||
LENGTH_MASK = JSSTRING_BITMASK(LENGTH_BITS),
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user