From patchwork Fri Dec 2 17:20:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 9458919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7753C60515 for ; Fri, 2 Dec 2016 17:20:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6285328593 for ; Fri, 2 Dec 2016 17:20:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51C572858F; Fri, 2 Dec 2016 17:20:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFD972858F for ; Fri, 2 Dec 2016 17:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752297AbcLBRUW (ORCPT ); Fri, 2 Dec 2016 12:20:22 -0500 Received: from gofer.mess.org ([80.229.237.210]:50127 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbcLBRUW (ORCPT ); Fri, 2 Dec 2016 12:20:22 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id 2B146604BD; Fri, 2 Dec 2016 17:20:21 +0000 (GMT) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH v4l-utils 1/6] ir-ctl: uninitialised memory used Date: Fri, 2 Dec 2016 17:20:16 +0000 Message-Id: <1480699221-9267-1-git-send-email-sean@mess.org> X-Mailer: git-send-email 2.1.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We might end up with a corrupt rc6. Signed-off-by: Sean Young --- 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: