Date: Mon, 16 Oct 2017 07:15:50 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324658 - head/usr.sbin/wlandebug Message-ID: <201710160715.v9G7Fo14070358@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Mon Oct 16 07:15:50 2017 New Revision: 324658 URL: https://svnweb.freebsd.org/changeset/base/324658 Log: wlandebug(8): add a sanity check. Modified: head/usr.sbin/wlandebug/wlandebug.c Modified: head/usr.sbin/wlandebug/wlandebug.c ============================================================================== --- head/usr.sbin/wlandebug/wlandebug.c Mon Oct 16 07:01:27 2017 (r324657) +++ head/usr.sbin/wlandebug/wlandebug.c Mon Oct 16 07:15:50 2017 (r324658) @@ -172,6 +172,9 @@ get_orig_iface_name(char *oid, size_t oid_size, char * if (ifconfig_get_orig_name(h, name, &orig_name) < 0) errc(1, ifconfig_err_errno(h), "cannot get interface name"); + if (strlen(orig_name) < strlen("wlan") + 1) + errx(1, "expecting a wlan interface name"); + ifconfig_close(h); setoid(oid, oid_size, orig_name); free(orig_name);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710160715.v9G7Fo14070358>