From patchwork Fri Jun 26 08:43:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrik Lundquist X-Patchwork-Id: 6679011 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C199C05AC for ; Fri, 26 Jun 2015 08:46:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA5F4206F3 for ; Fri, 26 Jun 2015 08:46:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01C01206E8 for ; Fri, 26 Jun 2015 08:46:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752636AbbFZIpZ (ORCPT ); Fri, 26 Jun 2015 04:45:25 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:35914 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571AbbFZIpP (ORCPT ); Fri, 26 Jun 2015 04:45:15 -0400 Received: by lbbpo10 with SMTP id po10so60224572lbb.3 for ; Fri, 26 Jun 2015 01:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GV+MUonHv2kVNJEt+jeyvDmhiB/0yTAmyEsDG2VGN14=; b=DFgwp+O5CrQ2+huM+78K73jLeY5eUxtP2WN2z4DIMzPIR368rdl6k9Zfkijll+GiHe wtkWZChw+Dwqpe3e+WvDCAPuvDx9KCI/f/hLahao9pKASjSg9bak8hVEXVqW6yCnjxXW LDAOa8kXcqebklXB1IZQTGWIfZWw1XJ4IuJv/vKXRVvxtVmSYuBVtvtKLk3dmV8JQdP5 v6ry/wMj28sapI53hkhP/xnzHLExXQKAsRRFYbUQS19xLXez1aqTurXk1LmAXbFd7Dky 2ecd6zfkmlTf3BDFDf6x76it9aspWT2LKXhjllaFiaPNn+ERQnhDhElHfJtHRKpxnbV5 O6yA== X-Received: by 10.152.2.38 with SMTP id 6mr540112lar.80.1435308314131; Fri, 26 Jun 2015 01:45:14 -0700 (PDT) Received: from nas.localdomain (c83-253-102-83.bredband.comhem.se. [83.253.102.83]) by mx.google.com with ESMTPSA id lb8sm7966129lbc.31.2015.06.26.01.45.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 01:45:13 -0700 (PDT) From: Patrik Lundquist To: linux-btrfs@vger.kernel.org Cc: Patrik Lundquist Subject: [PATCH] btrfs-progs: inspect: Fix out of bounds string termination. Date: Fri, 26 Jun 2015 10:43:56 +0200 Message-Id: <1435308236-7931-1-git-send-email-patrik.lundquist@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Patrik Lundquist --- cmds-inspect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-inspect.c b/cmds-inspect.c index 053cf8e..aafe37d 100644 --- a/cmds-inspect.c +++ b/cmds-inspect.c @@ -293,7 +293,7 @@ static int cmd_subvolid_resolve(int argc, char **argv) goto out; } - path[PATH_MAX] = '\0'; + path[PATH_MAX-1] = '\0'; printf("%s\n", path); out: