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:
15e4565
)
Check length first in BUF_strnlen().
author
Ben Laurie
<ben@links.org>
Thu, 22 May 2014 09:11:40 +0000
(10:11 +0100)
committer
Ben Laurie
<ben@links.org>
Thu, 22 May 2014 09:12:10 +0000
(10:12 +0100)
crypto/buffer/buf_str.c
patch
|
blob
|
history
diff --git
a/crypto/buffer/buf_str.c
b/crypto/buffer/buf_str.c
index 60dab54344ce98d89b669df50abeb1f140dba87a..12ef1fa0649694d68bd7565f3112a9c6cdc77967 100644
(file)
--- a/
crypto/buffer/buf_str.c
+++ b/
crypto/buffer/buf_str.c
@@
-64,7
+64,7
@@
size_t BUF_strnlen(const char *str, size_t maxlen)
{
const char *p;
- for (p = str;
*p != '\0' && maxlen-- != 0
; ++p)
+ for (p = str;
maxlen-- != 0 && *p != '\0'
; ++p)
;
return p - str;