From f89dcb9dfa3041a8544b240f8dba91e6d110c9b7 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 7 Jun 2022 14:28:01 -0600 Subject: [PATCH] Initialize potentially uninitialized variable If `cvtoptions.pathkind` is true, then `canon` will not be initialized and it is accessed at line 279. --- ncdump/ncpathcvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncdump/ncpathcvt.c b/ncdump/ncpathcvt.c index 01beaf812..43443e39f 100755 --- a/ncdump/ncpathcvt.c +++ b/ncdump/ncpathcvt.c @@ -191,7 +191,7 @@ main(int argc, char** argv) { int c; char* cvtpath = NULL; - char* inpath, *canon; + char* inpath, *canon = NULL; memset((void*)&cvtoptions,0,sizeof(cvtoptions)); cvtoptions.drive = 'c';