git: e8d7ae918a10 - main - jail: fix a NULL pointer derefence in parsing ip6.addr settings.

From: Jamie Gritton <jamie_at_FreeBSD.org>
Date: Thu, 15 Dec 2022 00:50:25 UTC
The branch main has been updated by jamie:

URL: https://cgit.FreeBSD.org/src/commit/?id=e8d7ae918a105f252cf06249787d82f43e023ba8

commit e8d7ae918a105f252cf06249787d82f43e023ba8
Author:     Jamie Gritton <jamie@FreeBSD.org>
AuthorDate: 2022-12-15 00:47:55 +0000
Commit:     Jamie Gritton <jamie@FreeBSD.org>
CommitDate: 2022-12-15 00:47:55 +0000

    jail: fix a NULL pointer derefence in parsing ip6.addr settings.
    
    This is the counterpart to bd24e861b4ef, which did the same for ip4.
    PR:             268377
    Reported by:    ahkithaama at proton.me
---
 usr.sbin/jail/command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c
index c1d418d6cc69..6b23af25b01c 100644
--- a/usr.sbin/jail/command.c
+++ b/usr.sbin/jail/command.c
@@ -440,7 +440,7 @@ run_command(struct cfjail *j)
 		} else
 			argc = 4;
 
-		if (!down) {
+		if (!down && extrap != NULL) {
 			for (cs = strtok(extrap, " "); cs;
 			     cs = strtok(NULL, " ")) {
 				size_t len = strlen(cs) + 1;