Date: Sat, 16 Feb 2019 00:38:25 +0000 (UTC) From: Eugene Grosbein <eugen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344194 - stable/12/usr.sbin/jail Message-ID: <201902160038.x1G0cP07071553@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eugen Date: Sat Feb 16 00:38:25 2019 New Revision: 344194 URL: https://svnweb.freebsd.org/changeset/base/344194 Log: MFC r343112: jail(8): stop crashing with SIGSEGV inside run_command() function while processing not entirely correct jail.conf(5) file having something like "ip4.addr = 127.0.0.1;" and no "ip4 = ...;" so extrap variable stays NULL. Reported by: marck Modified: stable/12/usr.sbin/jail/command.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/jail/command.c ============================================================================== --- stable/12/usr.sbin/jail/command.c Sat Feb 16 00:37:08 2019 (r344193) +++ stable/12/usr.sbin/jail/command.c Sat Feb 16 00:38:25 2019 (r344194) @@ -374,7 +374,7 @@ run_command(struct cfjail *j) argc = 4; } - if (!down) { + if (!down && extrap != NULL) { for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { size_t len = strlen(cs) + 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902160038.x1G0cP07071553>