summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-05-13 14:39:41 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2010-05-13 14:39:41 +0200
commit539c0da85348b52534429bed7ff0a5ea24bbf00f (patch)
tree78dfa10c6c122807ff7f95b173e31d425b1c0441 /remux.c
parente2a995f3e7b56defa21c489e29d7618ca7ff022c (diff)
downloadvdr-539c0da85348b52534429bed7ff0a5ea24bbf00f.tar.gz
vdr-539c0da85348b52534429bed7ff0a5ea24bbf00f.tar.bz2
Fixed a possible out of buffer memory access in case of bad TS data
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/remux.c b/remux.c
index 3ac83dd7..80ebeb77 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.44 2010/04/18 13:40:20 kls Exp $
+ * $Id: remux.c 2.45 2010/05/13 14:16:56 kls Exp $
*/
#include "remux.h"
@@ -663,6 +663,10 @@ void cTsToPes::PutTs(const uchar *Data, int Length)
if (length + Length > size) {
size = max(KILOBYTE(2), length + Length);
data = (uchar *)realloc(data, size);
+ if (!data) {
+ Reset();
+ return;
+ }
}
memcpy(data + length, Data, Length);
length += Length;