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:
895cba1
)
Sanity check DES_enc_write buffer length
author
Matt Caswell
<matt@openssl.org>
Mon, 27 Apr 2015 10:04:56 +0000
(11:04 +0100)
committer
Matt Caswell
<matt@openssl.org>
Thu, 30 Apr 2015 22:12:39 +0000
(23:12 +0100)
Add a sanity check to DES_enc_write to ensure the buffer length provided
is not negative. Thanks to Kevin Wojtysiak (Int3 Solutions) and Paramjot
Oberoi (Int3 Solutions) for reporting this issue.
Reviewed-by: Andy Polyakov <appro@openssl.org>
crypto/des/enc_writ.c
patch
|
blob
|
history
diff --git
a/crypto/des/enc_writ.c
b/crypto/des/enc_writ.c
index 55cc7fcb41011865748f9145e73aebee25b8bec1..9ea7c5a503c8c67356f6c6027a15739cb2e94e3e 100644
(file)
--- a/
crypto/des/enc_writ.c
+++ b/
crypto/des/enc_writ.c
@@
-96,6
+96,9
@@
int DES_enc_write(int fd, const void *_buf, int len,
const unsigned char *cp;
static int start = 1;
+ if (len < 0)
+ return -1;
+
if (outbuf == NULL) {
outbuf = OPENSSL_malloc(BSIZE + HDRSIZE);
if (outbuf == NULL)