From 96e6c444c3196200af9d5a0c210cda9e7f5db258 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 11 Dec 2015 21:11:02 +0000 Subject: [PATCH] Fix sesutil locate when a sesid is passed to locate command --- usr.sbin/sesutil/sesutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/sesutil/sesutil.c b/usr.sbin/sesutil/sesutil.c index 2f2b529dcb6a..5c96070a0fb8 100644 --- a/usr.sbin/sesutil/sesutil.c +++ b/usr.sbin/sesutil/sesutil.c @@ -172,7 +172,7 @@ sesled(int argc, char **argv, bool setfault) sesid = strtoul(disk, &endptr, 10); if (*endptr == '\0') { endptr = strrchr(uflag, '*'); - if (*endptr == '*') { + if (endptr != NULL && *endptr == '*') { warnx("Must specifying a SES device (-u) to use a SES " "id# to identify a disk"); usage(stderr, (setfault ? "fault" : "locate"));