Commit 541ca7c
authored
Merge commit from fork
Motivation:
We should validate if the requested length is actual valid and readable before we try to allocate it to guard against excessive memory usage caused by a malformated request
Modifications:
Add length check and throw if not pass
Result:
Guard against excessive memory usage caused by malformated request1 parent 943edb3 commit 541ca7c
3 files changed
Lines changed: 18 additions & 1 deletion
File tree
- codec-http3/src/main/java/io/netty/handler/codec/http3
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
402 | 408 | | |
403 | 409 | | |
404 | 410 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4649 | 4649 | | |
4650 | 4650 | | |
4651 | 4651 | | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
4652 | 4655 | | |
4653 | 4656 | | |
4654 | 4657 | | |
| |||
4666 | 4669 | | |
4667 | 4670 | | |
4668 | 4671 | | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
4669 | 4675 | | |
4670 | 4676 | | |
4671 | 4677 | | |
| |||
0 commit comments