Commit 967e13e
committed
fix: EVP_DigestSignUpdate accept size_t not unsigned int
EVP_DigestSignUpdate was declared with unsigned int for the count
parameter, unlike OpenSSL's size_t. EVP_DigestVerifyUpdate had the
right declaration but cast the size_t to unsigned int before passing
it to the internal helper, silently truncating counts > UINT_MAX.
Fix all three sites:
- wolfssl_evp_digest_pk_update internal helper: unsigned int -> size_t
- wolfSSL_EVP_DigestSignUpdate: unsigned int -> size_t in decl + defn
- wolfSSL_EVP_DigestVerifyUpdate: remove (unsigned int) cast
- Add overflow guard before narrowing to word32 for wc_HmacUpdate
Refs: ZD-217341 parent c098e53 commit 967e13e
4 files changed
Lines changed: 84 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2429 | 2429 | | |
2430 | 2430 | | |
2431 | 2431 | | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4697 | 4697 | | |
4698 | 4698 | | |
4699 | 4699 | | |
4700 | | - | |
| 4700 | + | |
4701 | 4701 | | |
4702 | 4702 | | |
4703 | | - | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
4704 | 4706 | | |
4705 | 4707 | | |
4706 | 4708 | | |
| |||
4851 | 4853 | | |
4852 | 4854 | | |
4853 | 4855 | | |
4854 | | - | |
| 4856 | + | |
4855 | 4857 | | |
4856 | 4858 | | |
4857 | 4859 | | |
| |||
4988 | 4990 | | |
4989 | 4991 | | |
4990 | 4992 | | |
4991 | | - | |
| 4993 | + | |
4992 | 4994 | | |
4993 | 4995 | | |
4994 | 4996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
| 844 | + | |
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| |||
0 commit comments