]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Check sshauthopt_new() for NULL. bz#3425, from
authordtucker@openbsd.org <dtucker@openbsd.org>
Tue, 26 Apr 2022 07:41:44 +0000 (07:41 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 27 Apr 2022 11:30:01 +0000 (21:30 +1000)
tessgauthier at microsoft.com.  ok djm@

OpenBSD-Commit-ID: af0315bc3e44aa406daa7e0ae7c2d719a974483f

auth.c

diff --git a/auth.c b/auth.c
index 58754c07001090b93c17c017110a0d83578efc8d..5809c0b0dd447cbf1a262e9d4a0778f4cc68abb3 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.154 2022/02/23 11:17:10 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.155 2022/04/26 07:41:44 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -903,7 +903,8 @@ auth_restrict_session(struct ssh *ssh)
        debug_f("restricting session");
 
        /* A blank sshauthopt defaults to permitting nothing */
-       restricted = sshauthopt_new();
+       if ((restricted = sshauthopt_new()) == NULL)
+               fatal_f("sshauthopt_new failed");
        restricted->permit_pty_flag = 1;
        restricted->restricted = 1;