... | ... |
@@ -18,7 +18,7 @@ |
18 | 18 |
#include "others.h" |
19 | 19 |
|
20 | 20 |
#define DBG_PREFIX "LibClamAV debug: " |
21 |
-#define BUFSIZ 1024 |
|
21 |
+#define DBG_BUFSIZ 1024 |
|
22 | 22 |
|
23 | 23 |
enum mspack_type { |
24 | 24 |
FILETYPE_DUNNO, |
... | ... |
@@ -274,10 +274,10 @@ static void mspack_fmap_message(struct mspack_file *file, const char *fmt, ...) |
274 | 274 |
|
275 | 275 |
if (UNLIKELY(cli_debug_flag)) { |
276 | 276 |
va_list args; |
277 |
- char buff[BUFSIZ]; |
|
277 |
+ char buff[DBG_BUFSIZ]; |
|
278 | 278 |
size_t len = sizeof(DBG_PREFIX) - 1; |
279 | 279 |
|
280 |
- memset(buff, 0, BUFSIZ); |
|
280 |
+ memset(buff, 0, DBG_BUFSIZ); |
|
281 | 281 |
|
282 | 282 |
/* Add the prefix */ |
283 | 283 |
strncpy(buff, DBG_PREFIX, len); |
... | ... |
@@ -288,7 +288,7 @@ static void mspack_fmap_message(struct mspack_file *file, const char *fmt, ...) |
288 | 288 |
|
289 | 289 |
/* Add a newline and a null terminator */ |
290 | 290 |
buff[strlen(buff)] = '\n'; |
291 |
- buff[strlen(buff) + 1] = '\n'; |
|
291 |
+ buff[strlen(buff) + 1] = '\0'; |
|
292 | 292 |
|
293 | 293 |
fputs(buff, stderr); |
294 | 294 |
} |