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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to