~ubuntu-branches/ubuntu/precise/vlc/precise-proposed

« back to all changes in this revision

Viewing changes to contrib/src/src/zvbi/zvbi-ssize_max.patch

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-03-24 01:33:03 UTC
  • mfrom: (1.1.46) (3.5.39 sid)
  • Revision ID: package-import@ubuntu.com-20120324013303-km51kpl9kixydb8g
Really add the preinst from Didier Raboud to vlc to drop it's doc directory
before unpacking a symlink to vlc-nox's over it. (Closes: #613121, #662217)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
6
 
@@ -1076,8 +1076,6 @@
7
 
                size_t count;
8
 
 
9
 
                count = src_size;
10
 
-               if (unlikely (src_size > SSIZE_MAX))
11
 
-                       count = SSIZE_MAX & -4096;
12
 
 
13
 
                for (retry = 10;; --retry) {
14
 
                        actual = write (e->_handle.fd, src, count);
15
 
@@ -1632,12 +1630,7 @@
16
 
                        free (e->buffer.data);
17
 
                }
18
 
 
19
 
-               if (unlikely (e->buffer.offset > (size_t) SSIZE_MAX)) {
20
 
-                       errno = EOVERFLOW;
21
 
-                       actual = -1; /* failed */
22
 
-               } else {
23
 
-                       actual = e->buffer.offset;
24
 
-               }
25
 
+               actual = e->buffer.offset;
26
 
        } else {
27
 
                if (VBI_EXPORT_TARGET_ALLOC == e->target)
28
 
                        free (e->buffer.data);