Message ID | 1429525035-21377-3-git-send-email-ciprian.barbu@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBC42RN5IWUGBB25E2OUQKGQEWA7ZIGY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF3A620553 for <linaro@patches.linaro.org>; Mon, 20 Apr 2015 10:18:19 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf36352283wgi.3 for <linaro@patches.linaro.org>; Mon, 20 Apr 2015 03:18:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=hFGsWWTBPCzHYDioqoYLLjki+kVp7CuS6UwhHMKxv/k=; b=RgTbdN94V3trMq1JB2OujrFhI5cA5DD23+ioUNoMbkTV9xtbSD97p0by9rEDbVktre 9KRfDDSRaqgZYZOjtac1X8dds3qw9rwjNCc+ndWJwT0fMV/vf4tW0vjyNSTF2Cn0yDih L61jga4AjUjvWZqMQ7fG8PBtWZj6flHcbscZwC7CrHkHgxfX32KfmZ7LYM2GVHAWeWmW O5O65Q6sdqsT4faBmXTEFi4qsyK75BOFH2R/hUH8K5FkOse2YNJBue+v7NID9Z43LQg6 lNkskpk2QnaT01QkYTEVHiwnvrMqFwrAJLWxWNx7ciDXSQ/01yQMYkcokDD8XNjKJ5xv x61w== X-Gm-Message-State: ALoCoQnkADw5LWTmJgnqZEYQt6kkoMgGppElOhisGvN/o3xydG2XmylhcaNJTOAn9sd+XrzlbqsB X-Received: by 10.112.122.39 with SMTP id lp7mr6755437lbb.5.1429525099181; Mon, 20 Apr 2015 03:18:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.101 with SMTP id z5ls810524laz.12.gmail; Mon, 20 Apr 2015 03:18:19 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr14797343lac.41.1429525099040; Mon, 20 Apr 2015 03:18:19 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id 5si14680819las.0.2015.04.20.03.18.18 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2015 03:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbqq2 with SMTP id qq2so126575713lbb.3 for <patchwork-forward@linaro.org>; Mon, 20 Apr 2015 03:18:18 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr3224977lbc.19.1429525098621; Mon, 20 Apr 2015 03:18:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1342907lbt; Mon, 20 Apr 2015 03:18:17 -0700 (PDT) X-Received: by 10.55.22.194 with SMTP id 63mr27184240qkw.3.1429525097305; Mon, 20 Apr 2015 03:18:17 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y195si19116233qky.81.2015.04.20.03.18.13; Mon, 20 Apr 2015 03:18:17 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 7A43B61D07; Mon, 20 Apr 2015 10:18:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0DCE261CCD; Mon, 20 Apr 2015 10:17:43 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2085B61CD1; Mon, 20 Apr 2015 10:17:37 +0000 (UTC) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id C083B61CC9 for <lng-odp@lists.linaro.org>; Mon, 20 Apr 2015 10:17:35 +0000 (UTC) Received: by labbd9 with SMTP id bd9so123096443lab.2 for <lng-odp@lists.linaro.org>; Mon, 20 Apr 2015 03:17:34 -0700 (PDT) X-Received: by 10.112.137.164 with SMTP id qj4mr14974147lbb.105.1429525054344; Mon, 20 Apr 2015 03:17:34 -0700 (PDT) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id ew6sm3463978lbc.40.2015.04.20.03.17.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Apr 2015 03:17:33 -0700 (PDT) From: Ciprian Barbu <ciprian.barbu@linaro.org> To: lng-odp@lists.linaro.org Date: Mon, 20 Apr 2015 13:17:15 +0300 Message-Id: <1429525035-21377-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1429525035-21377-1-git-send-email-ciprian.barbu@linaro.org> References: <1429525035-21377-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH NETMAP 2/2] linux-netmap: fix buffer not null terminated X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" <lng-odp-bounces@lists.linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ciprian.barbu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/platform/linux-netmap/odp_packet_netmap.c b/platform/linux-netmap/odp_packet_netmap.c index 2988b96..b2a4e0a 100644 --- a/platform/linux-netmap/odp_packet_netmap.c +++ b/platform/linux-netmap/odp_packet_netmap.c @@ -106,7 +106,7 @@ static int nm_do_ioctl(pkt_netmap_t * const pkt_nm, unsigned long cmd, int fd = pkt_nm->nm_dev->sockfd; memset(&ifr, 0, sizeof(ifr)); - strncpy(ifr.ifr_name, pkt_nm->nm_dev->ifname, sizeof(ifr.ifr_name)); + snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", pkt_nm->nm_dev->ifname); switch (cmd) { case SIOCSIFFLAGS:
CID 56895: Buffer not null terminated: odp_packet_netmap.c https://bugs.linaro.org/show_bug.cgi?id=1394 Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> --- platform/linux-netmap/odp_packet_netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)