[glib: 1/2] Fixing g_format_size_full() on Windows-x64



commit 101c8b3c19f6c9b3ab102afd0b91e386b6aa4b98
Author: Emmanuel Fleury <emmanuel fleury u-bordeaux fr>
Date:   Tue May 14 17:49:44 2019 +0200

    Fixing g_format_size_full() on Windows-x64
    
    For some reasons, the buffer used in the Format struct was not long
    enough on Windows-x64 and the final null ('\0') character was omitted
    leading to a limited memory disclosure.

 glib/gutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gutils.c b/glib/gutils.c
index 4f7d9b19f..9e2f0b0b7 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -2300,7 +2300,7 @@ g_format_size_full (guint64          size,
   struct Format
   {
     guint64 factor;
-    char string[9];
+    char string[10];
   };
 
   typedef enum


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