File tboot-fix-stackoverflow.patch of Package tboot.2349

Index: tboot-1.8.3/tboot/common/printk.c
===================================================================
--- tboot-1.8.3.orig/tboot/common/printk.c
+++ tboot-1.8.3/tboot/common/printk.c
@@ -83,8 +83,8 @@ static void memlog_init(void)
 
 static void memlog_write( const char *str, unsigned int count)
 {
-    /* allocate a 32K temp buffer for compressed log  */
-    char buf[32*1024];
+    /* use a 32K static buffer for compressed log  */
+    static char buf[32*1024];
     char *out=buf;
 
     if ( g_log == NULL || count > g_log->max_size )
openSUSE Build Service is sponsored by