linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* {PATCH] media: dvb-core: Crash from uninitialized pointer
@ 2017-10-10 23:23 Ron Economos
  0 siblings, 0 replies; only message in thread
From: Ron Economos @ 2017-10-10 23:23 UTC (permalink / raw)
  To: linux-media

In the function dvb_net_ule(), the pointer h.priv is not initialized. 
When a ULE packet is received, the kernel crashes.

diff --git a/drivers/media/dvb-core/dvb_net.c 
b/drivers/media/dvb-core/dvb_net.c
index 06b0dcc..abfa3e5 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -798,6 +798,7 @@ static void dvb_net_ule(struct net_device *dev, 
const u8 *buf, size_t buf_len)
          * For all TS cells in current buffer.
          * Appearently, we are called for every single TS cell.
          */
+       h.priv = netdev_priv(dev);
         for (h.ts = h.buf, h.ts_end = h.buf + h.buf_len;
              h.ts < h.ts_end; /* no incr. */) {
                 if (h.new_ts) {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-10 23:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10 23:23 {PATCH] media: dvb-core: Crash from uninitialized pointer Ron Economos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).