summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authormiod <>2014-07-11 15:38:03 +0000
committermiod <>2014-07-11 15:38:03 +0000
commitcedaabbf47d82e83c060fc736f23c938412ed50c (patch)
treeb61f04f6825114d247cf715be87943785dc353aa /src/lib
parentf5edd4467e4f88d1ef7a7847590853e8b1de2c29 (diff)
downloadopenbsd-cedaabbf47d82e83c060fc736f23c938412ed50c.tar.gz
openbsd-cedaabbf47d82e83c060fc736f23c938412ed50c.tar.bz2
openbsd-cedaabbf47d82e83c060fc736f23c938412ed50c.zip
Prevent infinite loop during configuration file parsing; OpenSSL PR #2985
via OpenSSL trunk.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/conf/conf_def.c4
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_def.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c
index e5bff15f7a..c437aeb457 100644
--- a/src/lib/libcrypto/conf/conf_def.c
+++ b/src/lib/libcrypto/conf/conf_def.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_def.c,v 1.27 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: conf_def.c,v 1.28 2014/07/11 15:38:03 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -313,7 +313,7 @@ again:
313 end = eat_alpha_numeric(conf, ss); 313 end = eat_alpha_numeric(conf, ss);
314 p = eat_ws(conf, end); 314 p = eat_ws(conf, end);
315 if (*p != ']') { 315 if (*p != ']') {
316 if (*p != '\0') { 316 if (*p != '\0' && ss != p) {
317 ss = p; 317 ss = p;
318 goto again; 318 goto again;
319 } 319 }
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c
index e5bff15f7a..c437aeb457 100644
--- a/src/lib/libssl/src/crypto/conf/conf_def.c
+++ b/src/lib/libssl/src/crypto/conf/conf_def.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_def.c,v 1.27 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: conf_def.c,v 1.28 2014/07/11 15:38:03 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -313,7 +313,7 @@ again:
313 end = eat_alpha_numeric(conf, ss); 313 end = eat_alpha_numeric(conf, ss);
314 p = eat_ws(conf, end); 314 p = eat_ws(conf, end);
315 if (*p != ']') { 315 if (*p != ']') {
316 if (*p != '\0') { 316 if (*p != '\0' && ss != p) {
317 ss = p; 317 ss = p;
318 goto again; 318 goto again;
319 } 319 }