Closed Bug 658766 Opened 13 years ago Closed 3 years ago

getFormattedString causes segmentation fault with not enough arguments

Categories

(Core :: Internationalization, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED WONTFIX

People

(Reporter: thomas, Assigned: smontagu)

References

Details

(Keywords: crash)

User-Agent:       Mozilla/5.0 (X11; Linux i686 on x86_64; rv:5.0a2) Gecko/20110520 Firefox/5.0a2
Build Identifier: Mozilla XULRunner 2.0.1 - 20110429131801

Segmentation fault is caused when we use getFormattedString with not enough elements for the second parameter in comparison of the string to be formatted.

Reproducible: Always

Steps to Reproduce:
1.Write in test.properties "test.value=this test %1$S because we %2$S %3$S... What do you think M. %4$S"
2.In the xul document, create a stringbundle which inserts test.properties, with id="stringbundle"
3.In the js file, try this: document.getElementById('stringbundle').getFormattedString('test.value', ['is terrible', 'crash']);


Actual Results:  
Application crashes, with a segmentation fault
Depends on: 288400
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash

We're not going to invest in StringBundle anymore.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.