apps: fix profile update reading end of lines
authorNathan West <nathan.west@gnuradio.org>
Mon, 1 Aug 2016 21:12:24 +0000 (17:12 -0400)
committerA. Maitland Bottoms <bottoms@debian.org>
Sun, 27 Aug 2017 17:44:55 +0000 (18:44 +0100)
Gbp-Pq: Name 0003-apps-fix-profile-update-reading-end-of-lines.patch

apps/volk_profile.cc

index 2086e3fc37e525dfb14e8427405c3da9d54d45ff..51591cc1925569ef396c12a50c8f0072b0a5289f 100644 (file)
@@ -261,7 +261,7 @@ void read_results(std::vector<volk_test_results_t> *results, std::string path)
                     found = 127;
                 }
                 str_size = config_str.size();
-                char buffer[128];
+                char buffer[128] = {'\0'};
                 config_str.copy(buffer, found + 1, 0);
                 buffer[found] = '\0';
                 single_kernel_result.push_back(std::string(buffer));