freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 26b545f36: apinames: Fix out-of-scope reference of a


From: Werner Lemberg
Subject: [freetype2] master 26b545f36: apinames: Fix out-of-scope reference of a static array.
Date: Sun, 13 Oct 2024 04:52:20 -0400 (EDT)

branch: master
commit 26b545f36867508da2f2f318a93d78e673436598
Author: Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>
Commit: Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>

    apinames: Fix out-of-scope reference of a static array.
    
    * apinames.c (names_dump): For WATCOM_LBC format, the
      DLL name with no suffix is constructed on a static
      array temp[], but the scope is closed before use it.
      The declaration of temp[] is moved to the wider
      scope for the dumping part to refer it.
---
 src/tools/apinames.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index 38407b2d7..343428bac 100644
--- a/src/tools/apinames.c
+++ b/src/tools/apinames.c
@@ -181,6 +181,7 @@ names_dump( FILE*         out,
 
   case OUTPUT_WATCOM_LBC:
     {
+      char         temp[512];
       const char*  dot;
 
 
@@ -195,7 +196,6 @@ names_dump( FILE*         out,
       dot = strchr( dll_name, '.' );
       if ( dot )
       {
-        char  temp[512];
         int   len = dot - dll_name;
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]