diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2015-07-31 00:28:38 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2015-07-31 00:28:38 +0200 |
commit | e48074952743f53d8ac529d4debc421e7e0f6937 (patch) | |
tree | 0e488a636c967a40f7468bc2e41344018d36b811 | |
parent | 4f4fa563d742ad510544213c67330667027b38c2 (diff) | |
download | gcab-e48074952743f53d8ac529d4debc421e7e0f6937.tar.gz |
decomp: fix gcc warning strict-overflow
-rw-r--r-- | libgcab/decomp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libgcab/decomp.c b/libgcab/decomp.c index 43f59de..cce368e 100644 --- a/libgcab/decomp.c +++ b/libgcab/decomp.c @@ -1001,7 +1001,9 @@ int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state) { window_posn += match_length; /* copy match data - no worries about destination wraps */ - while (match_length-- > 0) *rundest++ = *runsrc++; + memcpy(rundest, runsrc, match_length); + rundest += match_length; + runsrc += match_length; } } break; @@ -1090,7 +1092,9 @@ int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state) { window_posn += match_length; /* copy match data - no worries about destination wraps */ - while (match_length-- > 0) *rundest++ = *runsrc++; + memcpy(rundest, runsrc, match_length); + rundest += match_length; + runsrc += match_length; } } break; |