typedef struct{
int length;
char data[1];
}string;

struct{
int length;
char data[buf_size];
}a;

のとき

(string)a

のようにキャストするのもテクニックとしては知っておいたほうがいいかも