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)

Submitted by:  Robert Swiecki <jagger>
Submitted on:  Sat 05 Jun 2010 03:32:53 PM UTC  
Severity:  3 - Normal Item Group:  Crash
Status:  Fixed Privacy:  Public
Assigned to:  Werner LEMBERG <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 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>


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)

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

    Only logged-in users can vote.




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