[PATCH v4l-utils 1/6] ir-ctl: uninitialised memory used

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

 



We might end up with a corrupt rc6.

Signed-off-by: Sean Young <sean@xxxxxxxx>
---
 utils/ir-ctl/ir-encode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/ir-ctl/ir-encode.c b/utils/ir-ctl/ir-encode.c
index a0d2f4c..1bf0ac6 100644
--- a/utils/ir-ctl/ir-encode.c
+++ b/utils/ir-ctl/ir-encode.c
@@ -310,6 +310,7 @@ static int rc6_encode(enum rc_proto proto, unsigned scancode, unsigned *buf)
 
 	buf[n++] = NS_TO_US(rc6_unit * 6);
 	buf[n++] = NS_TO_US(rc6_unit * 2);
+	buf[n] = 0;
 
 	switch (proto) {
 	default:
-- 
2.9.3

--
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