svn commit: r330654 - head/usr.sbin/mlx5tool

Hans Petter Selasky hselasky at FreeBSD.org
Thu Mar 8 15:28:14 UTC 2018


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;


More information about the svn-src-head mailing list