fixes 0-byte allocation in _cttp_bods_to_vec()

This commit is contained in:
Joe Bryan 2018-12-08 16:35:40 -05:00
parent 0d5beaf774
commit b60668f1d8

View File

@ -152,6 +152,11 @@ _cttp_bods_to_vec(u3_hbod* bod_u, c3_w* tot_w)
} }
} }
if ( 0 == len_w ) {
*tot_w = len_w;
return 0;
}
vec_u = c3_malloc(sizeof(h2o_iovec_t) * len_w); vec_u = c3_malloc(sizeof(h2o_iovec_t) * len_w);
len_w = 0; len_w = 0;