Closed Bug 336129 Opened 15 years ago Closed 15 years ago

Missing out-of-memory check at gfx/cairo/cairo/src/cairo-atsui-font.c:185

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: vda, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060320 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060320 Firefox/1.5

    font = malloc(sizeof(cairo_atsui_font_t));

    _cairo_scaled_font_init(&font->base, toy_face, font_matrix, ctm, options,
                            &cairo_atsui_scaled_font_backend);

    cairo_matrix_multiply(&scale, font_matrix, ctm);
    font->style = CreateSizedCopyOfStyle(style, &scale);


Reproducible: Always
this one should really be filed in bugs.freedesktop.org instead (product cairo)
Component: General → GFX: Thebes
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Here's a patch for this specific issue.

This has already been committed to upstream cairo, (in some 1.1.3 and will be in all descendant snapshots/releases).

Note that there's another unchecked malloc later in the same file. The patch adds a comment for it, but doesn't fix it. That's a job for the ATSUI maintainer as I would probably get it wrong if I tried it myself.
resolving invalid since these should be filed upstream (and since they've been fixed upstream)
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 3 indicates that this should have been resolved as INVALID (not FIXED).
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.