svn commit: r331593 - stable/11/usr.sbin/mlx5tool

Hans Petter Selasky hselasky at FreeBSD.org
Mon Mar 26 21:14:21 UTC 2018


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;


More information about the svn-src-all mailing list