03f5d9b
From fa378a8f2bc1b24ab93c157495960080aa788299 Mon Sep 17 00:00:00 2001
03f5d9b
From: TJ Saunders <tj@castaglia.org>
03f5d9b
Date: Wed, 8 Aug 2018 11:15:21 -0700
03f5d9b
Subject: [PATCH] Bug#4356: Fix infinite loop by actually iterating properly
03f5d9b
 for the next configuration record.  Oops.
03f5d9b
03f5d9b
---
03f5d9b
 contrib/mod_sftp/mod_sftp.c | 4 +++-
03f5d9b
 1 file changed, 3 insertions(+), 1 deletion(-)
03f5d9b
03f5d9b
diff --git a/contrib/mod_sftp/mod_sftp.c b/contrib/mod_sftp/mod_sftp.c
03f5d9b
index b7fdfa541..655b12af1 100644
03f5d9b
--- a/contrib/mod_sftp/mod_sftp.c
03f5d9b
+++ b/contrib/mod_sftp/mod_sftp.c
03f5d9b
@@ -1,6 +1,6 @@
03f5d9b
 /*
03f5d9b
  * ProFTPD - mod_sftp
03f5d9b
- * Copyright (c) 2008-2017 TJ Saunders
03f5d9b
+ * Copyright (c) 2008-2018 TJ Saunders
03f5d9b
  *
03f5d9b
  * This program is free software; you can redistribute it and/or modify
03f5d9b
  * it under the terms of the GNU General Public License as published by
03f5d9b
@@ -1211,6 +1211,8 @@ MODRET set_sftphostkey(cmd_rec *cmd) {
03f5d9b
           insecure_hostkey_perms = TRUE;
03f5d9b
           break;
03f5d9b
         }
03f5d9b
+
03f5d9b
+        c = find_config_next(c, c->next, CONF_PARAM, "SFTPOptions", FALSE);
03f5d9b
       }
03f5d9b
 
03f5d9b
       if (insecure_hostkey_perms) {