projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba875ba
)
cryptocop: fix assertion in create_output_descriptors()
author
Roel Kluin
<
[email protected]
>
Fri, 5 Mar 2010 21:42:32 +0000
(13:42 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 6 Mar 2010 19:26:28 +0000
(11:26 -0800)
size_t desc_len cannot be less than 0, test before the subtraction.
Signed-off-by: Roel Kluin <
[email protected]
>
Cc: Mikael Starvik <
[email protected]
>
Cc: Jesper Nilsson <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/cris/arch-v32/drivers/cryptocop.c
patch
|
blob
|
history
diff --git
a/arch/cris/arch-v32/drivers/cryptocop.c
b/arch/cris/arch-v32/drivers/cryptocop.c
index fd529a0ec758aa3a018df065729616310a39cf12..b70fb34939d97b68859f2fadbf042253ec70d659 100644
(file)
--- a/
arch/cris/arch-v32/drivers/cryptocop.c
+++ b/
arch/cris/arch-v32/drivers/cryptocop.c
@@
-628,9
+628,9
@@
static int create_output_descriptors(struct cryptocop_operation *operation, int
cdesc->dma_descr->buf = (char*)virt_to_phys(operation->tfrm_op.indata[*iniov_ix].iov_base + *iniov_offset);
cdesc->dma_descr->after = cdesc->dma_descr->buf + dlength;
+ assert(desc_len >= dlength);
desc_len -= dlength;
*iniov_offset += dlength;
- assert(desc_len >= 0);
if (*iniov_offset >= operation->tfrm_op.indata[*iniov_ix].iov_len) {
*iniov_offset = 0;
++(*iniov_ix);