changeset 29405:5edbab3df93b

stream/realrtsp/real.c: Fix integer overflow Pointed-out-by: tixxDZ <tixxdz at gmail dot com> - DZCORE Labs, Algeria
author uau
date Mon, 27 Jul 2009 16:53:48 +0000
parents efbe0c7de351
children e1c1e13cb646
files stream/realrtsp/real.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/realrtsp/real.c	Mon Jul 27 06:47:41 2009 +0000
+++ b/stream/realrtsp/real.c	Mon Jul 27 16:53:48 2009 +0000
@@ -386,6 +386,8 @@
     return (n <= 0) ? 0 : n;
   }
   rmff_dump_pheader(&ph, *buffer);
+  if (size < 12)
+      return 0;
   size-=12;
   n=rtsp_read_data(rtsp_session, (*buffer)+12, size);