Closed Bug 427698 Opened 17 years ago Closed 17 years ago

system libpng should not save unknown PNG chunk data

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: glennrp+bmo, Assigned: glennrp+bmo)

References

()

Details

Attachments

(1 obsolete file)

When an unknown PNG chunk type is encountered by the system libpng, it saves the chunk data for possible later use. Mozilla/Firefox will never use that data, so memory allocation and other CPU resources are wasted (The embedded libpng does not support unknown chunk handling and does not waste resources). The test PNG in the URL above contains several unknown chunk types. It is possible to avoid ever saving unknown chunk data by means of a one-line patch to the PNG decoder, similar to the lines already present to avoid saving unused known chunks.
This patch does not affect the embedded libpng. It will cause the system libpng to always ignore any unknown PNG chunk types that it encounters, thereby saving memory and other resources.
Attachment #314263 - Flags: superreview?(tor)
Attachment #314263 - Flags: review?(pavlov)
Attachment #314263 - Flags: review?(pavlov) → review+
I have been studying this situation and now believe that the system libpng also already always ignores unknown chunks, so this patch is not necessary. I suggest marking this WONTFIX.
Severity: normal → minor
Comment on attachment 314263 [details] [diff] [review] Always ignore unknown PNG chunk types Request for sr cancelled per comment #2.
Attachment #314263 - Flags: superreview?(tor)
Resolving INVALID.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Attachment #314263 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: