Bug 64730

Summary: REGRESSION (r82194): jvalueToJavaValue() does not correctly set length of String property
Product: WebKit Reporter: Steve Block <steveblock>
Component: JavaAssignee: Steve Block <steveblock>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, steveblock
Priority: P1 Keywords: Regression
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch ap: review+

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]
Patch
Comment 3 Steve Block 2011-07-19 08:57:19 PDT
Committed r91260: <http://trac.webkit.org/changeset/91260>