changeset 17470:ecbe9abc14e3

lib-otp: OTP_MAX_WORD_LEN wasn't actually enforced, any word lengths could have been used. Doesn't look like this could have caused any real problems. Found by Coverity
author Timo Sirainen <tss@iki.fi>
date Fri, 13 Jun 2014 01:20:25 +0300
parents 54f1beb8d071
children f5cb6a0d615b
files src/lib-otp/otp-parse.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-otp/otp-parse.c	Fri Jun 13 01:11:24 2014 +0300
+++ b/src/lib-otp/otp-parse.c	Fri Jun 13 01:20:25 2014 +0300
@@ -106,7 +106,7 @@
 			}
 		} else {
 			if (i_isalpha(c)) {
-				if (len > OTP_MAX_WORD_LEN) {
+				if (++len > OTP_MAX_WORD_LEN) {
 					count = 0;
 					break;
 				}