[Webkit-unassigned] [Bug 137637] New: Null character causes early string termination in Web SQL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 11 11:06:34 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137637

           Summary: Null character causes early string termination in Web
                    SQL
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: nolan at nolanlawson.com


Steps to reproduce the problem:
1. Store a string or blob in Web SQL containing the "\u0000" character
2. Retrieve it normally
3. Notice that everything is cut off after the \u0000

What is the expected behavior?
I expect the full string/blob to be returned

What went wrong?
The data was truncated. Here's a live example: http://bl.ocks.org/nolanlawson/9b5c13afb1ac0f7e70fe

This is especially bad when storing binary blobs, because if that binary data contains the 00 byte anywhere, then it will be cut off!

I've also filed an issue on Chromium, since this bug seems to have been around for awhile: https://code.google.com/p/chromium/issues/detail?id=422690

A workaround is to use "select hex()" when getting back data that may contain a null character, but this is sub-optimal for performance, especially with binary blobs.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list