Bug 1580262 Comment 35 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

UnescapeSlashes looks a bit hairy, although I don't _think_ it's incorrect. I can see that if it was used on an nsACString rather than a nsCString/nsAutoCString there's potential for it to overwrite memory (nsACString isn't necessarily nul-terminated). But I don't see that here.

In any case, that code makes me a bit nervous, so this patch adds in a more robust version.

Magnus: I've flagged it for review because I suspect landing it might be the quickest way to get a build to Ashley for testing. 

The old UnescapeSlashes() is still there and used in a couple of places, but I'll do a followup patch to get rid of it when I get the chance.
UnescapeSlashes looks a bit hairy, although I don't _think_ it's incorrect. I can see that if it was used on an nsACString rather than a nsCString/nsAutoCString there's potential for it to overwrite memory (nsACString isn't necessarily nul-terminated). But I don't see that here.

In any case, that code makes me a bit nervous, so this patch adds in a more robust version. It might fix the crash (fingers crossed)!

Magnus: I've flagged it for review because I suspect landing it might be the quickest way to get a build to Ashley for testing. 

The old UnescapeSlashes() is still there and used in a couple of places, but I'll do a followup patch to get rid of it when I get the chance.

Back to Bug 1580262 Comment 35