Commit d246d525 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Remember to actually record the length of variable length attributes

A variable length attribute (OA_HEADERS and OA_VARY) are allowed to be
overwritten if the new data has the exact same length as the previous
data. To check this, its length is recorded. But the length wasn't
recorded, and the code would treat it as a new attribute.

The reason this hasn't caused issues is that the code looking at
OA_HEADERS and OA_VARY ignores the stored attribute length, and that
these aren't ever overwritten.
parent e9c70c73
......@@ -585,6 +585,7 @@ sml_setattr(struct worker *wrk, struct objcore *oc, enum obj_attr attr,
assert(st->len + len <= st->space); \
o->va_##l = st->ptr + st->len; \
st->len += len; \
o->va_##l##_len = len; \
retval = o->va_##l; \
} \
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment