From 366b2ea7487a54110356f60ceb972c2edc93b39d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 28 May 2015 10:58:40 +0200 Subject: [PATCH] * src/tools/apinames.c (names_dump): Fix invalid reference. Problem reported by Guzman Mosqueda, Jose R . --- ChangeLog | 7 +++++++ src/tools/apinames.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff9472933..b80b49241 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-05-28 Werner Lemberg + + * src/tools/apinames.c (names_dump): Fix invalid reference. + + Problem reported by Guzman Mosqueda, Jose R + . + 2015-05-24 Werner Lemberg [truetype] Fix commit from 2015-05-22. diff --git a/src/tools/apinames.c b/src/tools/apinames.c index c85df721a..9f81b1a6c 100644 --- a/src/tools/apinames.c +++ b/src/tools/apinames.c @@ -10,7 +10,7 @@ * accepted if you are using GCC for compilation (and probably by * other compilers too). * - * Author: David Turner, 2005, 2006, 2008-2013 + * Author: David Turner, 2005, 2006, 2008-2013, 2015 * * This code is explicitly placed into the public domain. * @@ -156,6 +156,7 @@ names_dump( FILE* out, case OUTPUT_WATCOM_LBC: { const char* dot; + char temp[512]; if ( dll_name == NULL ) @@ -169,8 +170,7 @@ names_dump( FILE* out, dot = strchr( dll_name, '.' ); if ( dot != NULL ) { - char temp[512]; - int len = dot - dll_name; + int len = dot - dll_name; if ( len > (int)( sizeof ( temp ) - 1 ) )