28 lines
685 B
Diff
28 lines
685 B
Diff
Linear memory extents over SSIZE_MAX are undefined, so there is no
|
|
point in protecting against them.
|
|
--- a/src/export.c
|
|
+++ b/src/export.c
|
|
@@ -1056,8 +1056,6 @@
|
|
size_t count;
|
|
|
|
count = src_size;
|
|
- if (unlikely (src_size > SSIZE_MAX))
|
|
- count = SSIZE_MAX & -4096;
|
|
|
|
for (retry = 10;; --retry) {
|
|
actual = write (e->_handle.fd, src, count);
|
|
@@ -1614,12 +1612,7 @@
|
|
free (e->buffer.data);
|
|
}
|
|
|
|
- if (unlikely (e->buffer.offset > (size_t) SSIZE_MAX)) {
|
|
- errno = EOVERFLOW;
|
|
- actual = -1; /* failed */
|
|
- } else {
|
|
- actual = e->buffer.offset;
|
|
- }
|
|
+ actual = e->buffer.offset;
|
|
} else {
|
|
if (VBI_EXPORT_TARGET_ALLOC == e->target)
|
|
free (e->buffer.data);
|
|
|