changeset 18671:8fb542b97815

Protect SIZE_MAX use
author rtogni
date Fri, 09 Jun 2006 23:19:13 +0000
parents bf04d0097971
children f3b0eea2ae9a
files libmpdemux/ebml.c libmpdemux/url.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/ebml.c	Fri Jun 09 22:33:09 2006 +0000
+++ b/libmpdemux/ebml.c	Fri Jun 09 23:19:13 2006 +0000
@@ -14,6 +14,10 @@
 #include "bswap.h"
 
 
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+
 /*
  * Read: the element content data ID.
  * Return: the ID.
--- a/libmpdemux/url.c	Fri Jun 09 22:33:09 2006 +0000
+++ b/libmpdemux/url.c	Fri Jun 09 23:19:13 2006 +0000
@@ -15,6 +15,10 @@
 #include "mp_msg.h"
 #include "help_mp.h"
 
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+
 URL_t*
 url_new(const char* url) {
 	int pos1, pos2,v6addr = 0;