[vlc-commits] Revert "block: only do the size test when it's meaningful"

Steve Lhomme git at videolan.org
Thu Jul 12 09:01:32 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jul 12 09:01:04 2018 +0200| [5e61cce9699b5779d0d44f1c1a479c318ede8f04] | committer: Steve Lhomme

Revert "block: only do the size test when it's meaningful"

This reverts commit 7a699a45da1e5f622a375cec405b98c3cc5715d3.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e61cce9699b5779d0d44f1c1a479c318ede8f04
---

 src/misc/block.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/misc/block.c b/src/misc/block.c
index 19e0c07109..7d67138768 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -387,14 +387,12 @@ block_t *block_File(int fd, bool write)
         return NULL;
     }
 
-//#if sizeof(uintmax_t) > sizeof(size_t)
     /* Prevent an integer overflow in mmap() and malloc() */
     if ((uintmax_t)st.st_size >= SIZE_MAX)
     {
         errno = ENOMEM;
         return NULL;
     }
-//#endif
     length = (size_t)st.st_size;
 
 #ifdef HAVE_MMAP



More information about the vlc-commits mailing list