1 Linear memory extents over SSIZE_MAX are undefined, so there is no
2 point in protecting against them.
3 diff -ru zvbi.orig/src/export.c zvbi/src/export.c
4 --- zvbi.orig/src/export.c 2011-11-06 11:22:47.000000000 +0200
5 +++ zvbi/src/export.c 2011-11-06 11:27:39.000000000 +0200
10 - if (unlikely (src_size > SSIZE_MAX))
11 - count = SSIZE_MAX & -4096;
13 for (retry = 10;; --retry) {
14 actual = write (e->_handle.fd, src, count);
15 @@ -1632,12 +1630,7 @@
16 free (e->buffer.data);
19 - if (unlikely (e->buffer.offset > (size_t) SSIZE_MAX)) {
21 - actual = -1; /* failed */
23 - actual = e->buffer.offset;
25 + actual = e->buffer.offset;
27 if (VBI_EXPORT_TARGET_ALLOC == e->target)
28 free (e->buffer.data);