Open Bug 1281725 Opened 8 years ago Updated 2 years ago

Refuse to allocate a huge deinterlacing buffer in the PNG decoder

Categories

(Core :: Graphics: ImageLib, defect, P3)

defect

Tracking

()

People

(Reporter: seth, Unassigned)

References

Details

(Whiteboard: [MemShrink:P2][gfx-noted])

In bug 1262549 it was noticed that we can run into OOM on Linux when trying to decode a GIF which requires a large deinterlacing buffer because even though we use fallible allocation, overcommit prevents this from helping us avoid OOM. In that bug the problem got fixed by using SurfaceCache::CanHold() as a heuristic to limit the size of the buffer.

The PNG decoder also has a deinterlacing buffer. Let's use the same heuristic there.
Whiteboard: [MemShrink]
More likely to OOM in animated GIF but probably a good idea to have PNG match here.
Whiteboard: [MemShrink] → [MemShrink:P2]
Whiteboard: [MemShrink:P2] → [MemShrink:P2][gfx-noted]

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: seth.bugzilla → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.