diff -urN lha-114i/src/lhext.c lha-114i.lhext/src/lhext.c --- lha-114i/src/lhext.c 2000-10-04 23:57:38.000000000 +0900 +++ lha-114i.lhext/src/lhext.c 2004-05-20 01:06:41.000000000 +0900 @@ -207,9 +207,11 @@ } if (extract_directory) - sprintf(name, "%s/%s", extract_directory, q); - else - strcpy(name, q); + snprintf(name, sizeof(name), "%s/%s", extract_directory, q); + else { + strncpy(name, q, sizeof(name)); + name[sizeof(name) - 1] = '\0'; + } /* LZHDIRS_METHODを持つヘッダをチェックする */