Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Mar 2018 15:28:13 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330654 - head/usr.sbin/mlx5tool
Message-ID:  <201803081528.w28FSD4M001078@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Mar  8 15:28:13 2018
New Revision: 330654
URL: https://svnweb.freebsd.org/changeset/base/330654

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

Modified:
  head/usr.sbin/mlx5tool/mlx5tool.c

Modified: head/usr.sbin/mlx5tool/mlx5tool.c
==============================================================================
--- head/usr.sbin/mlx5tool/mlx5tool.c	Thu Mar  8 15:21:56 2018	(r330653)
+++ head/usr.sbin/mlx5tool/mlx5tool.c	Thu Mar  8 15:28:13 2018	(r330654)
@@ -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?201803081528.w28FSD4M001078>