fix ubsan errors
Signed-off-by: Asra Ali <asraa@google.com>
This commit is contained in:
parent
ec084acdba
commit
78a56cf66f
|
@ -82,8 +82,10 @@ void nghttp2_buf_reset(nghttp2_buf *buf) {
|
|||
}
|
||||
|
||||
void nghttp2_buf_wrap_init(nghttp2_buf *buf, uint8_t *begin, size_t len) {
|
||||
buf->begin = buf->pos = buf->last = buf->mark = begin;
|
||||
buf->end = begin + len;
|
||||
buf->begin = buf->pos = buf->last = buf->mark = buf->end = begin;
|
||||
if (len) {
|
||||
buf->end += len;
|
||||
}
|
||||
}
|
||||
|
||||
static int buf_chain_new(nghttp2_buf_chain **chain, size_t chunk_length,
|
||||
|
|
|
@ -818,8 +818,10 @@ int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame,
|
|||
size_t len = 0;
|
||||
|
||||
origin = frame->payload;
|
||||
p = payload;
|
||||
end = p + payloadlen;
|
||||
p = end = payload;
|
||||
if (payloadlen) {
|
||||
end += payloadlen;
|
||||
}
|
||||
|
||||
for (; p != end;) {
|
||||
if (end - p < 2) {
|
||||
|
|
Loading…
Reference in New Issue