[FPD] Fix buffer overrun in FPD output code.