projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d8cca8
)
Fix infinite loop. PR#3347
author
Viktor Dukhovni
<openssl-users@dukhovni.org>
Sun, 11 May 2014 19:28:56 +0000
(20:28 +0100)
committer
Matt Caswell
<matt@openssl.org>
Sun, 11 May 2014 20:13:18 +0000
(21:13 +0100)
apps/req.c
patch
|
blob
|
history
diff --git
a/apps/req.c
b/apps/req.c
index 5e034a85e8028277788f68ed9daec63fae4e23d1..d41385d7063a7fd7d6d36eaabe7577fd60eddca0 100644
(file)
--- a/
apps/req.c
+++ b/
apps/req.c
@@
-1489,7
+1489,13
@@
start:
#ifdef CHARSET_EBCDIC
ebcdic2ascii(buf, buf, i);
#endif
#ifdef CHARSET_EBCDIC
ebcdic2ascii(buf, buf, i);
#endif
- if(!req_check_len(i, n_min, n_max)) goto start;
+ if(!req_check_len(i, n_min, n_max))
+ {
+ if (batch || value)
+ return 0;
+ goto start;
+ }
+
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
(unsigned char *) buf, -1,-1,mval)) goto err;
ret=1;
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
(unsigned char *) buf, -1,-1,mval)) goto err;
ret=1;
@@
-1548,7
+1554,12
@@
start:
#ifdef CHARSET_EBCDIC
ebcdic2ascii(buf, buf, i);
#endif
#ifdef CHARSET_EBCDIC
ebcdic2ascii(buf, buf, i);
#endif
- if(!req_check_len(i, n_min, n_max)) goto start;
+ if(!req_check_len(i, n_min, n_max))
+ {
+ if (batch || value)
+ return 0;
+ goto start;
+ }
if(!X509_REQ_add1_attr_by_NID(req, nid, chtype,
(unsigned char *)buf, -1)) {
if(!X509_REQ_add1_attr_by_NID(req, nid, chtype,
(unsigned char *)buf, -1)) {