longer than the length of the current attribute if the buffer were reused and previously longer, so bits of the previous, longer attribute would be written. Fix this by using the actual attribute length.
longer than the length of the current attribute if the buffer were reused and previously longer, so bits of the previous, longer attribute would be written. Fix this by using the actual attribute length.