From patchwork Tue Jul 24 16:02:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 1231601 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6FCBA4025E for ; Tue, 24 Jul 2012 15:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233Ab2GXPEV (ORCPT ); Tue, 24 Jul 2012 11:04:21 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:46076 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754427Ab2GXPEV (ORCPT ); Tue, 24 Jul 2012 11:04:21 -0400 Received: from [194.168.151.111] (earthlight.etchedpixels.co.uk [81.2.110.250]) by lxorguk.ukuu.org.uk (8.14.5/8.14.1) with ESMTP id q6OFbXCC003007; Tue, 24 Jul 2012 16:37:41 +0100 From: Alan Cox Subject: [PATCH, RESEND] az6007: fix incorrect memcpy To: linux-media@vger.kernel.org, akpm@linux-foundation.org Date: Tue, 24 Jul 2012 17:02:46 +0100 Message-ID: <20120724160235.7031.21809.stgit@bluebook> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Alan Cox Some parts of the C language are subtle and evil. This is one example. Reported-by: dcb314@hotmail.com Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44041 Signed-off-by: Alan Cox --- drivers/media/dvb/dvb-usb/az6007.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/dvb/dvb-usb/az6007.c b/drivers/media/dvb/dvb-usb/az6007.c index 8ffcad0..86861e6 100644 --- a/drivers/media/dvb/dvb-usb/az6007.c +++ b/drivers/media/dvb/dvb-usb/az6007.c @@ -590,7 +590,7 @@ static int az6007_read_mac_addr(struct dvb_usb_device *d, u8 mac[6]) int ret; ret = az6007_read(d, AZ6007_READ_DATA, 6, 0, st->data, 6); - memcpy(mac, st->data, sizeof(mac)); + memcpy(mac, st->data, 6); if (ret > 0) deb_info("%s: mac is %pM\n", __func__, mac);