pluginreg.dat incorrectly parsed if plugin strings contain certain characters




15 years ago
7 years ago


(Reporter: tenthumbs, Assigned: peterlubczynski-bugs)




Firefox Tracking Flags

(Not tracked)




15 years ago
Install a new plugin that happens to contain a newline in its description
string. Mozilla is happy, about:plugins shows the correct info, and the
plugin works. Close mozilla and restart mozilla. This time about:plugins
just shows a truncated string and the plugin is not recognized. Further 
restarts do not help.

What's happening is that the nsPluginManifestLineReader class in
nsPluginManifestLineReader.h has a field delimiter character and an
end_of_line character (':' or '|' and '$') but it also uses newlines as a
delimiter. Why? A comment in nsPluginHostImpl.cpp seems to indicate that
someone once had trouble because a delimiter character could occur in a

I can find no documentation that says plugin strings cannot contain
newlines, 4.x allows it. I also cannot find any documentation that says
the delimiter characters are disallowed. There just 7-bit ascii which most
people would consider as normal. I also think mozilla should just treat
strings as opaque data and just use them as they are (except for the mime
descriptions, obviously).

Personally, I think pluginreg.dat should be scrapped. Mozilla does not 
handle plugins like plugger that change their properties dynamically. But 
I'm probably alone in this.

One approach would be to make pluginreg.dat a binary file. It would be 
slower to write but faster to read and string would always be 
null-terminated. Another would be to keep the text format but prefix any 
string with a size field.


15 years ago
Blocks: 220704

Comment 1

15 years ago
OS --> All, and suggest upping severity as dependencies cause crashes on Mac OS X.
Severity: normal → major
Keywords: crash
OS: Linux → All
Hardware: PC → All


12 years ago
No longer blocks: 220704
Duplicate of this bug: 220704
QA Contact: plugins

Comment 3

7 years ago
This bug has no information on current versions and no clear lead as to what the crashes that it tracks are. This should either be updated with current info and reopened or new bugs be filed on concrete actions/crashes on current code.
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.