coverity/74718: FP: NULL Pointer Dereference

dynamic_buffer_ensure() allocates buf->data; add an assert to make this
clear to coverity.
Why not just `assert(buf->data)`? We've been doing that everywhere else.