This never happens but in case it would, it's better to report the
correct offset of the error instead of a negative value.
if (ret < 0) {
/* FIXME: bad contents. how to proceed here when we're in H2 ? */
- h1m->err_pos = ret;
+ h1m->err_pos = ofs + max + ret;
h2s_error(h2s, H2_ERR_INTERNAL_ERROR);
goto end;
}
if (ret < 0) {
/* FIXME: bad contents. how to proceed here when we're in H2 ? */
- h1m->err_pos = ret;
+ h1m->err_pos = ofs + max + ret;
h2s_error(h2s, H2_ERR_INTERNAL_ERROR);
goto end;
}