summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_entry_sparse.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-03 18:37:54 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-03 19:02:49 (GMT)
commit2f1978632b709a9370b3cb1137375c05351d149c (patch)
tree85980710818211b8188709643e6714e8839feee9 /Utilities/cmlibarchive/libarchive/archive_entry_sparse.c
parent23e4666cf57c31c719472debba83a43f54d351d8 (diff)
parent64713ae3ffddf6fbbfa7ea762c3d756cb245a066 (diff)
downloadCMake-2f1978632b709a9370b3cb1137375c05351d149c.zip
CMake-2f1978632b709a9370b3cb1137375c05351d149c.tar.gz
CMake-2f1978632b709a9370b3cb1137375c05351d149c.tar.bz2
Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in favor of the upstream side where possible. Resolve a logical conflict in archive_windows.h where the upstream port to Watcom was done slightly differently from ours.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_entry_sparse.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_sparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_entry_sparse.c b/Utilities/cmlibarchive/libarchive/archive_entry_sparse.c
index 10c5447..fed74f5 100644
--- a/Utilities/cmlibarchive/libarchive/archive_entry_sparse.c
+++ b/Utilities/cmlibarchive/libarchive/archive_entry_sparse.c
@@ -58,7 +58,7 @@ archive_entry_sparse_add_entry(struct archive_entry *entry,
if (offset < 0 || length < 0)
/* Invalid value */
return;
- if (offset + length < 0 ||
+ if (offset > INT64_MAX - length ||
offset + length > archive_entry_size(entry))
/* A value of "length" parameter is too large. */
return;