Bug 64730 - REGRESSION (r82194): jvalueToJavaValue() does not correctly set length of String property
Summary: REGRESSION (r82194): jvalueToJavaValue() does not correctly set length of Str...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Java (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Steve Block
Keywords: Regression
Depends on:
Reported: 2011-07-18 10:02 PDT by Steve Block
Modified: 2011-07-19 08:57 PDT (History)
2 users (show)

See Also:

Patch (1.85 KB, patch)
2011-07-19 02:46 PDT, Steve Block
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Block 2011-07-18 10:02:35 PDT
jvalueToJavaValue() does not correctly set the length of the String property created for JavaTypeString because the character array returned by getUCharactersFromJStringInEnv() is not null-terminated.

This is due to http://trac.webkit.org/changeset/82194, which switched from using GetStringUTFChars() (via getCharactersFromJString()) to using GetStringChars() (via getUCharactersFromJStringInEnv()). GetStringUTFChars() does null-terminate the character array whereas GetStringChars() does not.
Comment 1 Alexey Proskuryakov 2011-07-18 14:17:19 PDT
Marking as a regression per the above.
Comment 2 Steve Block 2011-07-19 02:46:59 PDT
Created attachment 101291 [details]
Comment 3 Steve Block 2011-07-19 08:57:19 PDT
Committed r91260: <http://trac.webkit.org/changeset/91260>