Closed Bug 329159 Opened 15 years ago Closed 15 years ago
Index Out Of Bounds Exception in Mozilla .get GREPath From Registry File
On some Windows machines, when calling Mozilla.getGREPathWithProperties(), the user gets an exception: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at java.lang.String.substring(Unknown Source) at org.mozilla.xpcom.Mozilla.getGREPathFromRegistryFile(Mozilla.java:344) at org.mozilla.xpcom.Mozilla.main(Mozilla.java:885)
This is the file created as a result of running 'regedit /e jx-registry.bad "HKEY_LOCAL_MACHINE\\Software\\mozilla.org\\GRE"' in the Mozilla.getGREPathWithProperties(). Parsing this file results in an exception.
The key Software\mozilla.org\GRE can itself have values, and will therefore be returned by the INIParser. So we just use the key length to skip over this key.
Attachment #213808 - Flags: review?(benjamin)
Comment on attachment 213808 [details] [diff] [review] patch r=mkaply
Attachment #213808 - Flags: review?(benjamin) → review+
Checked in to trunk. -> FIXED
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment on attachment 213808 [details] [diff] [review] patch Asking for 22.214.171.124 approval. XULRunner only. This patch fixes an exception that a few people are seeing. Would be good to get in to the XULRunner 1.8.0.x nightlies.
Attachment #213808 - Flags: approval126.96.36.199?
Comment on attachment 213808 [details] [diff] [review] patch approved for 1.8.0 branch, a=dveditz for drivers
Attachment #213808 - Flags: approval188.8.131.52? → approval184.108.40.206+
Checked in to 220.127.116.11.
You need to log in before you can comment on or make changes to this bug.