If this is correct, which it seems probably fine, I think it should be `ctx->bufferWrite %= ctx->mp3BufSize;` in case bufferWrite/size is much larger than mp3BufSize.  I wonder if size should actually be validated.

-[Unknown]