summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/v8/src/api.cc
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-08-09 14:34:58 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-09 09:56:30 +0200
commit30662b5d64ff633f57d89290da2a85507d561187 (patch)
tree96e6765db95a742df42f5c48f13411ddf3257416 /src/3rdparty/v8/src/api.cc
parentf489fb6c7d056514cc916d06ea11bacda37eb062 (diff)
Only read symbol_id for strings which are known to be symbols
Ensures that uninitialised symbol_id is not dereferenced if the string is created on the stack via code generators instead of on the heap. Task-number: QTBUG-23126 Change-Id: I083586ad46796e70b0246413742d326c60f379e5 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/3rdparty/v8/src/api.cc')
-rw-r--r--src/3rdparty/v8/src/api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/v8/src/api.cc b/src/3rdparty/v8/src/api.cc
index 1becc61..70d0a8a 100644
--- a/src/3rdparty/v8/src/api.cc
+++ b/src/3rdparty/v8/src/api.cc
@@ -3911,7 +3911,7 @@ String::CompleteHashData String::CompleteHash() const {
CompleteHashData result;
result.length = str->length();
result.hash = str->Hash();
- if (str->IsSeqString())
+ if (str->IsSeqAsciiString() && str->IsSymbol())
result.symbol_id = i::SeqString::cast(*str)->symbol_id();
return result;
}