The setter methods for bytes and fixed datum instances don't update the size field. So, for instance, if you create a datum:
avro_datum_t datum = avro_wrapbytes(NULL, 0);
Then later you update that datum to point to a different buffer:
avro_wrapbytes_set(datum, "hello", 5);
If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.