From: Peter Howkins Date: Mon, 2 Jul 2018 22:09:29 +0000 (+0100) Subject: libDtSearch: Coverity 87032 X-Git-Tag: 2.3.0a~250 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f0917ee2b5661f854266a42bd24493af2d2ccd77;p=oweals%2Fcde.git libDtSearch: Coverity 87032 --- diff --git a/cde/lib/DtSearch/hencode.c b/cde/lib/DtSearch/hencode.c index 32695067..5b42a318 100644 --- a/cde/lib/DtSearch/hencode.c +++ b/cde/lib/DtSearch/hencode.c @@ -138,7 +138,7 @@ void gen_vec (char *fname_huffcode_tab) continue; /* current character has LITERAL CODE */ - strcpy (temp, huff_code[LITERAL_NUM]); + snprintf(temp, sizeof(temp), "%s", huff_code[LITERAL_NUM]); *(code_length + i) = *(code_length + LITERAL_NUM) + 8; ch = (unsigned char) i; for (j = 0; j < 8; j++) {