From 06bcee7bb6c81328e50a1e0562a9e6f879c97baa Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sun, 20 Dec 2015 19:50:32 -0500 Subject: [PATCH] Forgot null terminator --- CLTool/src/compare.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLTool/src/compare.cpp b/CLTool/src/compare.cpp index 49d5fed..9384153 100644 --- a/CLTool/src/compare.cpp +++ b/CLTool/src/compare.cpp @@ -120,7 +120,7 @@ int main(int argc, char **argv) { if (diff_images) { FasTC::Image<> diff = img1.Diff(&img2, diff_multiplier); - char fname_buf [5 + 16 + 4]; // "diff-" + hash + ".png" + char fname_buf [5 + 16 + 4 + 1]; // "diff-" + hash + ".png" + null strncat(fname_buf, "diff-", 5); gen_random(fname_buf + 5, 16); strncat(fname_buf + 5 + 16, ".png", 4);