From patchwork Tue Jun 13 08:25:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Psurek X-Patchwork-Id: 17044 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 8A842820FB; Tue, 13 Jun 2017 13:08:49 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="A/qdNC8L"; dkim-atps=neutral Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by open-mesh.org (Postfix) with ESMTPS id 99BDD8075E for ; Tue, 13 Jun 2017 10:26:49 +0200 (CEST) Received: by mail-wr0-x241.google.com with SMTP id g76so27567028wrd.2 for ; Tue, 13 Jun 2017 01:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bUWL1WGTw+8vby+sb9brnSefdVmRn4tyTtdaQ9Nc/Fw=; b=A/qdNC8Lz9M37X9azhPbtgBx46Az2e6ljzFlFC+kL3T7UO8QZe09nrM0vMyTLsUkhS 0uoObzQIUSyu37zvhXyClocNxBsprMIyIXPAVM+niB0ZC15NJ+5W0FDTv0frZh7fE90L vAshanEvNKxjaOUgN6iIeeIxk+y+huwd9OuqKXRvQk+PMhTQBW1i5vwoqld/SiXsKyeV fHGm0fYgMs1LKzq7+g8PWdZZ6bcsSd3HSZu2peRqpzVipI+DR6GeTqjxkb0Z3SiLj+kD 93f92+C1acnYn86C5yvzDZw/5x7OScATkAgLWBu1lWY7yieB5Dln3ykYxVe2oNuL7OEa Qy8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bUWL1WGTw+8vby+sb9brnSefdVmRn4tyTtdaQ9Nc/Fw=; b=dAv2zD407NWzMYrjt9701Pm6/liRN4YmmcTqyBpEph6zl7JsH/tb+lwcHMRaYLOyQm avfv4uikU14Qouk94Fs2BB5G50ufKqIjbAvZEEkezUYNbKZRb0c031cSYdIVsLMeWJXP NQvNQ16ATkcO9/5rOiJGSBPQGoDdQuaWr+R3AQjqpJWE3zUBAqFGZwo6XufSzKgc2WCL dQ64qy7Uu9wgh+yasBLh5Gyxi4iYkXRuuXPmk793foVYMUzyOvqbWpELa08Dv9npVGnh 2AjGTxtAef4LjYFbCfkJrZqSU8osVB66De4abx/9GRssFLB7PuyAZJbNJ22ykl3uLbFW UlFA== X-Gm-Message-State: AKS2vOz6Wt6kMqLILYmHl/J0jhjyvW4rMl1ZbA3t1CIvlHef2NxIscq+ lCti+vu7fL9DILTp X-Received: by 10.28.238.213 with SMTP id j82mr1722491wmi.33.1497342408868; Tue, 13 Jun 2017 01:26:48 -0700 (PDT) Received: from soli.hausnetz (dslb-088-077-242-209.088.077.pools.vodafone-ip.de. [88.77.242.209]) by smtp.gmail.com with ESMTPSA id 135sm13921776wmy.11.2017.06.13.01.26.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jun 2017 01:26:48 -0700 (PDT) From: Philipp Psurek To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 13 Jun 2017 10:25:59 +0200 Message-Id: <20170613082600.24910-2-philipp.psurek@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170613082600.24910-1-philipp.psurek@gmail.com> References: <1496077749.5980.2.camel@gmail.com> <20170613082600.24910-1-philipp.psurek@gmail.com> Subject: [B.A.T.M.A.N.] [PATCH 1/2] batctl: change PATH_BUFF_LEN to maximal possible value X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The output of snprintf(path_buff, PATH_BUFF_LEN, SYS_ROUTING_ALGO_FMT, iface_dir->d_name) in sys.c can be between 34 and 289 bytes and should not write into a destination of size 200. Signed-off-by: Philipp Psurek --- functions.c | 2 +- functions.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.c b/functions.c index 2239440..8337ee8 100644 --- a/functions.c +++ b/functions.c @@ -59,7 +59,7 @@ #include "debugfs.h" #include "netlink.h" -#define PATH_BUFF_LEN 200 +#define PATH_BUFF_LEN 289 static struct timespec start_time; static char *host_name; diff --git a/functions.h b/functions.h index eca1406..c0a02a8 100644 --- a/functions.h +++ b/functions.h @@ -31,7 +31,7 @@ #define ETH_STR_LEN 17 #define BATMAN_ADV_TAG "batman-adv:" -#define PATH_BUFF_LEN 200 +#define PATH_BUFF_LEN 289 /* return time delta from start to end in milliseconds */ void start_timer(void);