Closed Bug 343409 Opened 19 years ago Closed 17 years ago

corrupted string arguments passed to javascript implementation of mozIStorageFunction.onFunctionCall

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: matousek, Assigned: vlad)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 Build Identifier: ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2006-07-01-09-trunk/xulrunner-1.9a1.en-US.linux-i686.tar.bz2 Strings, that are passed as arguments to SQLite user function (javascript implementation!), are twice as long as should be. The beginning of string contain valid data, the rest contain zero characters. Reproducible: Always Steps to Reproduce: 1. run attached javascript in xpcshell and see output. Actual Results: Arg length: 8 0 = 52 (52) 1 = 32 2 = 99 (99) 3 = 104 (104) 4 = 0 5 = 0 6 = 0 7 = 0 Should be: 4 ch(length: 4) Arg length: 12 0 = 54 (54) 1 = 32 2 = 99 (99) 3 = 104 (104) 4 = 97 (97) 5 = 114 (114) 6 = 0 7 = 0 8 = 0 9 = 0 10 = 0 11 = 0 Should be: 6 char(length: 6) Arg length: 16 0 = 56 (56) 1 = 32 2 = 99 (99) 3 = 104 (104) 4 = 97 (97) 5 = 114 (114) 6 = 97 (97) 7 = 99 (99) 8 = 0 9 = 0 10 = 0 11 = 0 12 = 0 13 = 0 14 = 0 15 = 0 Should be: 8 charac(length: 8) Arg length: 20 0 = 49 (49) 1 = 48 (48) 2 = 32 3 = 99 (99) 4 = 104 (104) 5 = 97 (97) 6 = 114 (114) 7 = 97 (97) 8 = 99 (99) 9 = 116 (116) 10 = 0 11 = 0 12 = 0 13 = 0 14 = 0 15 = 0 16 = 0 17 = 0 18 = 0 19 = 0 Should be: 10 charact(length: 10) workaround: fix every string argument of user functions like this: str = (str.indexOf("\0") == -1) ? str : str.substr(0, str.indexOf("\0"));
Attached file affected code example
Is this still valid Jan?
Haven't heard from the reporter, and I'm pretty sure this issue doesn't exists anymore.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: