Module Name: src
Committed By: jmcneill
Date: Thu Jul 14 01:37:09 UTC 2011
Modified Files:
src/sys/dev/dtv: dtv_demux.c
Log Message:
sections can't be > 4KB
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/dtv/dtv_demux.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/dtv/dtv_demux.c
diff -u src/sys/dev/dtv/dtv_demux.c:1.2 src/sys/dev/dtv/dtv_demux.c:1.3
--- src/sys/dev/dtv/dtv_demux.c:1.2 Wed Jul 13 22:50:24 2011
+++ src/sys/dev/dtv/dtv_demux.c Thu Jul 14 01:37:09 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $ */
+/* $NetBSD: dtv_demux.c,v 1.3 2011/07/14 01:37:09 jmcneill Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <[email protected]>
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.3 2011/07/14 01:37:09 jmcneill Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -469,6 +469,13 @@
}
sec->sec_length = section_length + 3;
+
+ /* maximum section length is 4KB */
+ if (sec->sec_length > sizeof(sec->sec_buf)) {
+ sec->sec_bytesused = sec->sec_length = 0;
+ goto done;
+ }
+
}
/* If we have bytes pending and we see payload unit start, flush buf */