Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2018 21:14:20 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331593 - stable/11/usr.sbin/mlx5tool
Message-ID:  <201803262114.w2QLEKEB042410@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Mar 26 21:14:20 2018
New Revision: 331593
URL: https://svnweb.freebsd.org/changeset/base/331593

Log:
  MFC r330654:
  Check that the address is specified in mlx5tool(8).
  
  Submitted by:	kib@
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/usr.sbin/mlx5tool/mlx5tool.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/mlx5tool/mlx5tool.c
==============================================================================
--- stable/11/usr.sbin/mlx5tool/mlx5tool.c	Mon Mar 26 21:11:43 2018	(r331592)
+++ stable/11/usr.sbin/mlx5tool/mlx5tool.c	Mon Mar 26 21:14:20 2018	(r331593)
@@ -47,6 +47,10 @@ parse_pci_addr(const char *addrstr, struct mlx5_fwdump
 	unsigned long selarr[4];
 	int i;
 
+	if (addrstr == NULL) {
+		warnx("no pci address specified");
+		return (1);
+	}
 	if (strncmp(addrstr, "pci", 3) == 0) {
 		addrstr += 3;
 		i = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803262114.w2QLEKEB042410>