From 1b38ceb0d4bb4ae32cb93c295e3ef493b91f9a78 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Thu, 28 May 2015 13:49:23 +0200 Subject: + Fixed defects found by Coverity (well, most of them) --- src/pklib/explode.c | 2 +- src/pklib/implode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pklib') diff --git a/src/pklib/explode.c b/src/pklib/explode.c index 73c5004..9796173 100644 --- a/src/pklib/explode.c +++ b/src/pklib/explode.c @@ -455,7 +455,7 @@ static unsigned int Expand(TDcmpStruct * pWork) // Note that if the output buffer overflowed previously, the extra decompressed bytes // are stored in "out_buff_overflow", and they will now be // within decompressed part of the output buffer. - memcpy(pWork->out_buff, &pWork->out_buff[0x1000], pWork->outputPos - 0x1000); + memmove(pWork->out_buff, &pWork->out_buff[0x1000], pWork->outputPos - 0x1000); pWork->outputPos -= 0x1000; } } diff --git a/src/pklib/implode.c b/src/pklib/implode.c index 1771b18..f29f54d 100644 --- a/src/pklib/implode.c +++ b/src/pklib/implode.c @@ -662,7 +662,7 @@ _00402252:; if(input_data_ended == 0) { input_data -= 0x1000; - memcpy(pWork->work_buff, pWork->work_buff + 0x1000, pWork->dsize_bytes + 0x204); + memmove(pWork->work_buff, pWork->work_buff + 0x1000, pWork->dsize_bytes + 0x204); } } -- cgit v1.2.3