[PATCH] TM6000: Fix code which cause memory corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



code was doing malloc when buf is null causing memory corruption. The
analog part is still pretty much broken but at least fixing this will
stop it from crashing the machine when streamon.

Signed-off-by: Bee Hock Goh <beehock@xxxxxxxxx>
diff -r 7c0b887911cf linux/drivers/staging/tm6000/tm6000-video.c
--- a/linux/drivers/staging/tm6000/tm6000-video.c       Mon Apr 05
22:56:43 2010 -0400
+++ b/linux/drivers/staging/tm6000/tm6000-video.c       Thu Apr 08
07:45:05 2010 +0800
@@ -502,7 +502,7 @@
        unsigned long copied;

        get_next_buf(dma_q, &buf);
-       if (!buf)
+       if (buf)
                outp = videobuf_to_vmalloc(&buf->vb);

        if (!outp)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux