From 3862353ba8f2e70149d9da39bc4e98cb2d8e57bf Mon Sep 17 00:00:00 2001
From: "U-BASIS\\dsmyda" <dsmyda@win-dsmyd-4990.basistech.net>
Date: Mon, 25 Feb 2019 13:08:24 -0500
Subject: [PATCH] Made string allocation from malloc rather than on the stack

---
 tsk/auto/auto_db.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tsk/auto/auto_db.cpp b/tsk/auto/auto_db.cpp
index 5772361de..0328f0beb 100755
--- a/tsk/auto/auto_db.cpp
+++ b/tsk/auto/auto_db.cpp
@@ -218,13 +218,13 @@ TskAutoDb::addImageDetails(const char* deviceId)
        if (ewf_info->md5hash_isset) {
            md5 = ewf_info->md5hash;
        }
-	   if (ewf_info->sha1hash_isset) {
-		   sha1 = ewf_info->sha1hash;
-	   }
+       if (ewf_info->sha1hash_isset) {
+           sha1 = ewf_info->sha1hash;
+       }
 
        //Need 1MB for libewf read and extra 100 bytes for header name and formatting
        const size_t buffer_size = 1024100;
-       char result[buffer_size];
+       char* result = (char*) malloc(buffer_size * sizeof(char));
 
        //Populate all of the libewf header values for the acquisition details column
        collectionDetails.append(libewf_read_description(ewf_info->handle, result, buffer_size));
-- 
GitLab