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:
085ccc5
)
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:13:22 +0000
(10:13 +0100)
crypto/buffer/buf_str.c
patch
|
blob
|
history
diff --git
a/crypto/buffer/buf_str.c
b/crypto/buffer/buf_str.c
index 35e4a2e7892617f879b712ade26b2f0cd058d73d..b4ff71ed5a9bb55fc85a40d15cb0398e64c736d4 100644
(file)
--- a/
crypto/buffer/buf_str.c
+++ b/
crypto/buffer/buf_str.c
@@
-66,7
+66,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;