Commit 6ed1188
committed
HTTP/2: extended guard for NULL buffer and zero length.
In addition to moving memcpy() under the length condition in 15bf6d8,
which addressed a reported UB due to string function conventions, this
is repeated for advancing an input buffer, to make the resulting code
more clean and readable.
Additionally, although considered harmless for both string functions and
additive operators, as previously discussed in GitHub PR 866, this fixes
the main source of annoying sanitizer reports in the module.
Prodded by UndefinedBehaviorSanitizer (pointer-overflow).1 parent 9d04b66 commit 6ed1188
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4113 | 4113 | | |
4114 | 4114 | | |
4115 | 4115 | | |
4116 | | - | |
4117 | | - | |
4118 | | - | |
4119 | | - | |
4120 | 4116 | | |
4121 | 4117 | | |
4122 | 4118 | | |
4123 | | - | |
4124 | | - | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
4125 | 4124 | | |
4126 | 4125 | | |
4127 | 4126 | | |
| |||
0 commit comments