Commit e57901c
Zero hdrtoken heap to fix use-of-uninitialized-value (#13172)
The hdrtoken heap allocated in hdrtoken_init() leaves padding bytes
between each token's null terminator and the next prefix slot
uninitialized, since ink_strlcpy only writes strlen+1 bytes but
heap_ptr advances by sstr_len (rounded up to sizeof(HdrTokenHeapPrefix)).
Switch to ats_calloc so the padding bytes are zeroed.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4d4086a commit e57901c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
| 410 | + | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| |||
0 commit comments