Fix a few things spotted by the gcc-6 sanitizer. Needs review.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-09-21 00:35:51 +02:00
parent ffa0efc898
commit 1bb0fa1809
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -325,7 +325,7 @@ void PackUnix::packExtent(
}
fi->seek(x.offset, SEEK_SET);
for (off_t rest = x.size; 0 != rest; ) {
int const filter_strategy = getStrategy(*ft);
int const filter_strategy = ft ? getStrategy(*ft) : 0;
int l = fi->readx(ibuf, UPX_MIN(rest, (off_t)blocksize));
if (l == 0) {
break;