From: Peter Howkins Date: Tue, 3 Jul 2018 17:39:32 +0000 (+0100) Subject: dtstyle: Coverity 87763 X-Git-Tag: 2.3.0a~233 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c743c30cb98998de80931e33b52d5fc8ad5190c8;p=oweals%2Fcde.git dtstyle: Coverity 87763 --- diff --git a/cde/programs/dtstyle/ColorFile.c b/cde/programs/dtstyle/ColorFile.c index fe44ca5b..5c87e8cf 100644 --- a/cde/programs/dtstyle/ColorFile.c +++ b/cde/programs/dtstyle/ColorFile.c @@ -248,7 +248,9 @@ ReadPalette( /* load the filename into the name element */ p = strstr (in_filename, PALETTE_SUFFIX); - *p = '\0'; + if(p) { + *p = '\0'; + } strcpy(new_palette->name, in_filename); /*