This patch modifies the ReadStr function in pg_backup_archiver.c to validatethe result of *AH->ReadBufPtr matches the value of l. The resulting erroris:
pg_restore: [archiver] expected 410 bytes, only got 275 bytes