From 0e41d008115e603eb5a11dedce51e6ccb6a4f58c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 18 Mar 2014 20:38:37 +0100 Subject: [PATCH] fix potential uninitialized object pointer. --- libs/fst/scanner.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/fst/scanner.cc b/libs/fst/scanner.cc index 99177b51db..12a20080b6 100644 --- a/libs/fst/scanner.cc +++ b/libs/fst/scanner.cc @@ -41,7 +41,7 @@ int main (int argc, char **argv) { } char *dllpath = argv[1]; - std::vector *infos; + std::vector *infos = 0; #ifdef LXVST_SUPPORT if (strstr (dllpath, ".so")) { infos = vstfx_get_info_lx(dllpath); @@ -54,7 +54,7 @@ int main (int argc, char **argv) { } #endif - if (infos->empty()) { + if (!infos || infos->empty()) { return EXIT_FAILURE; } else { return EXIT_SUCCESS;