bugThe FreeType Project - Bugs: bug #30054, buffer overflows in various tools...


bug #30054: buffer overflows in various tools (from freetype-demos)

Submitted by:  Robert Swiecki <jagger>
Submitted on:  Sat 05 Jun 2010 03:32:53 PM UTC  
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.3.13

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 07 Jun 2010 10:01:35 PM UTC, comment #1:

I've changed most of the %s to %.100s. Thanks for the report.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sat 05 Jun 2010 03:32:53 PM UTC, original submission:

E.g. from ftview.c

static struct status_
char header_buffer[256];

in write_header( FT_Error error_code )
sprintf( status.header_buffer, "File `%s': error 0x%04x",
basename, (FT_UShort)error_code );

with a long filename it produces on Linux with glibc

      • buffer overflow detected ***: /usr/local/fuzz/ttf/ftview terminated

======= Backtrace: =========

I recommend changing every sprintf into snprintf

Robert Swiecki <jagger>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by jagger (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Jun 2010 10:01:35 PM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Planned ReleaseNone=>2.3.13

    Back to the top

    Powered by Savane 3.1-cleanup1