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


You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Robert Swiecki <jagger>
Submitted:  Sat 05 Jun 2010 03:32:53 PM UTC
Severity:  3 - Normal Item Group:  Crash
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.3.13

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 Administrator
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.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-07 wl StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.3.13

    Back to the top

    Powered by Savane 3.9