This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: qv4l2/v4l2-ctl: fix buffer overrun in vivid-tpg.
Author:  Hans Verkuil <[email protected]>
Date:    Tue Oct 7 14:11:00 2014 +0200

The test pattern generator allocated only half the size for
random_line that it really needed, causing the tpg to write
right passed the end of the buffer.

Signed-off-by: Hans Verkuil <[email protected]>
(cherry picked from commit 1f7dfb79bdf6ebad19f2acaabb982e2f5aaade89)

 utils/v4l2-ctl/vivid-tpg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=5e1bfc1e390fb33378eb4486a3aa20a8a5b22968

diff --git a/utils/v4l2-ctl/vivid-tpg.c b/utils/v4l2-ctl/vivid-tpg.c
index 8576b2c..21e7f4e 100644
--- a/utils/v4l2-ctl/vivid-tpg.c
+++ b/utils/v4l2-ctl/vivid-tpg.c
@@ -136,7 +136,7 @@ int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
                tpg->black_line[plane] = vzalloc(max_w * pixelsz);
                if (!tpg->black_line[plane])
                        return -ENOMEM;
-               tpg->random_line[plane] = vzalloc(max_w * pixelsz);
+               tpg->random_line[plane] = vzalloc(max_w * 2 * pixelsz);
                if (!tpg->random_line[plane])
                        return -ENOMEM;
        }

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to