Commit b0356b7
committed
crypto: ahash - Fix crypto_ahash_import with partial block data
Restore the partial block buffer in crypto_ahash_import by copying
it. Check whether the partial block buffer exceeds the maximum
size and return -EOVERFLOW if it does.
Zero the partial block buffer in crypto_ahash_import_core.
Reported-by: T Pratham <t-pratham@ti.com>
Tested-by: T Pratham <t-pratham@ti.com>
Fixes: 9d7a0ab ("crypto: ahash - Handle partial blocks in API")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>1 parent 80b6104 commit b0356b7
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
664 | 670 | | |
665 | 671 | | |
666 | 672 | | |
| |||
674 | 680 | | |
675 | 681 | | |
676 | 682 | | |
| 683 | + | |
677 | 684 | | |
| 685 | + | |
678 | 686 | | |
679 | 687 | | |
680 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
681 | 691 | | |
682 | 692 | | |
683 | 693 | | |
| |||
0 commit comments