WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 99310
102293
IndexedDB: SerializedScriptValue::toWireString() fails for odd-length serialized data
https://bugs.webkit.org/show_bug.cgi?id=102293
Summary
IndexedDB: SerializedScriptValue::toWireString() fails for odd-length seriali...
Michael Pruett
Reported
2012-11-14 15:28:51 PST
SerializedScriptValue fails to produce a wire string representation value which can be deserialized for odd-length serialized data. The problem is that CloneDeserializer::toWireString() divides value.size() by sizeof(UChar) which omits the final byte of an odd-length buffer producing a wire representation which cannot be deserialized. Appending a zero-valued byte to an odd-length string is one way to fix this problem. The V8 implementation of SerializedScriptValue avoids this problem by using String as its internal representation and rounding up to an even number of bytes in Writer::ensureSpace(), thus ensuring that the internal representation is always an even number of bytes.
Attachments
Fix SerializedScriptValue::toWireString() for odd-length serialized data
(3.03 KB, patch)
2012-11-14 15:39 PST
,
Michael Pruett
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Pruett
Comment 1
2012-11-14 15:39:18 PST
Created
attachment 174271
[details]
Fix SerializedScriptValue::toWireString() for odd-length serialized data
Joshua Bell
Comment 2
2012-11-14 15:42:48 PST
This is effectively a duplicate of
webkit.org/b/99310
- it would make more sense to upload the patch there - but review the discussion first. The "right" solution is probably to rip the notion of "WireString" out of SSV and use e.g. Vector<char> instead. *** This bug has been marked as a duplicate of
bug 99310
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug