* src/tools/apinames.c (names_dump): Fix invalid reference. Problem reported by Guzman Mosqueda, Jose R <jose.r.guzman.mosqueda@intel.com>.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/ChangeLog b/ChangeLog
index ff94729..b80b492 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-05-28 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/apinames.c (names_dump): Fix invalid reference.
+
+ Problem reported by Guzman Mosqueda, Jose R
+ <jose.r.guzman.mosqueda@intel.com>.
+
2015-05-24 Werner Lemberg <wl@gnu.org>
[truetype] Fix commit from 2015-05-22.
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index c85df72..9f81b1a 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 ) )