projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
358961d
)
crypto: chcr - Fixes Unchecked dereference inside function
author
Harsh Jain
<harsh@chelsio.com>
Tue, 29 Nov 2016 13:30:37 +0000
(19:00 +0530)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 30 Nov 2016 12:01:46 +0000
(20:01 +0800)
Fixes
324429d74127
, Unchecked dereference inside function.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jitendra Lulla <JLULLA@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/chelsio/chcr_algo.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/crypto/chelsio/chcr_algo.c
b/drivers/crypto/chelsio/chcr_algo.c
index d24b7ce7914261e64eabefb07093fe4275fd14e8..0ae1b09c58ef956538d1b174b4aec241c9cbdd73 100644
(file)
--- a/
drivers/crypto/chelsio/chcr_algo.c
+++ b/
drivers/crypto/chelsio/chcr_algo.c
@@
-439,8
+439,9
@@
write_sg_to_skb(struct sk_buff *skb, unsigned int *frags,
skb->len += count;
skb->data_len += count;
skb->truesize += count;
+
while (count > 0) {
- if (
sg &&
(!(sg->length)))
+ if (
!sg ||
(!(sg->length)))
break;
spage = sg_page(sg);
get_page(spage);