Commit 08f2ba02 for tesseract

commit 08f2ba02f74ac49d2440fe301faa923a21281f81
Author: Stefan Weil <sw@weilnetz.de>
Date:   Thu Jan 14 12:10:58 2021 +0100

    Fix memory allocation in TFile::DeSerialize(std::vector<T>& data)

    lstmtraining crashed when creating traineddata files:

        Error: attempt to subscript container with out-of-bounds index 0, but
        container only holds 0 elements.

    Signed-off-by: Stefan Weil <sw@weilnetz.de>

diff --git a/src/ccutil/serialis.cpp b/src/ccutil/serialis.cpp
index 12e31594..3c045376 100644
--- a/src/ccutil/serialis.cpp
+++ b/src/ccutil/serialis.cpp
@@ -86,7 +86,7 @@ bool TFile::DeSerialize(std::vector<T>& data) {
     return false;
   } else if (size > 0) {
     // TODO: optimize.
-    data.reserve(size);
+    data.resize(size);
     return DeSerialize(&data[0], size);
   }
   data.clear();