From patchwork Sun Dec 13 11:41:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 66990 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBDBfpmL026626 for ; Sun, 13 Dec 2009 11:41:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607AbZLMLlX (ORCPT ); Sun, 13 Dec 2009 06:41:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752653AbZLMLlS (ORCPT ); Sun, 13 Dec 2009 06:41:18 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:39085 "HELO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752613AbZLMLlP (ORCPT ); Sun, 13 Dec 2009 06:41:15 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id A3BB719BBA8; Sun, 13 Dec 2009 12:41:13 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08891-19; Sun, 13 Dec 2009 12:41:12 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 8502F19BB95; Sun, 13 Dec 2009 12:41:12 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 314386DF8B9; Sun, 13 Dec 2009 12:37:21 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id 6DEF1480B; Sun, 13 Dec 2009 12:41:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 667224225; Sun, 13 Dec 2009 12:41:12 +0100 (CET) Date: Sun, 13 Dec 2009 12:41:12 +0100 (CET) From: Julia Lawall To: mchehab@infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 3/9] drivers/media: Correct code taking the size of a pointer Message-ID: MIME-Version: 1.0 X-Virus-Scanned: amavisd-new at diku.dk Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c index e280eb1..51f393d 100644 --- a/drivers/media/video/hdpvr/hdpvr-core.c +++ b/drivers/media/video/hdpvr/hdpvr-core.c @@ -145,7 +145,7 @@ static int device_authorization(struct hdpvr_device *dev) #ifdef HDPVR_DEBUG else { hex_dump_to_buffer(dev->usbc_buf, 46, 16, 1, print_buf, - sizeof(print_buf), 0); + 5*buf_size+1, 0); v4l2_dbg(MSG_INFO, hdpvr_debug, &dev->v4l2_dev, "Status request returned, len %d: %s\n", ret, print_buf); @@ -168,13 +168,13 @@ static int device_authorization(struct hdpvr_device *dev) response = dev->usbc_buf+38; #ifdef HDPVR_DEBUG - hex_dump_to_buffer(response, 8, 16, 1, print_buf, sizeof(print_buf), 0); + hex_dump_to_buffer(response, 8, 16, 1, print_buf, 5*buf_size+1, 0); v4l2_dbg(MSG_INFO, hdpvr_debug, &dev->v4l2_dev, "challenge: %s\n", print_buf); #endif challenge(response); #ifdef HDPVR_DEBUG - hex_dump_to_buffer(response, 8, 16, 1, print_buf, sizeof(print_buf), 0); + hex_dump_to_buffer(response, 8, 16, 1, print_buf, 5*buf_size+1, 0); v4l2_dbg(MSG_INFO, hdpvr_debug, &dev->v4l2_dev, " response: %s\n", print_buf); #endif