1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-24 06:46:19 +00:00
Lakka-LibreELEC/packages/multimedia/zvbi/patches/zvbi-0030-ssize_max.patch
2020-02-12 15:24:30 +00:00

29 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);