Page MenuHome GnuPG

"stray" error messages from corrupt file
Closed, ResolvedPublic

Description

Release: 1.2.1

Environment

GNU linux (Debian 2.4.17)

Description

A corrupt pgp/gpg file will not be reported as corrupt, which makes troubleshooting times longer than necessary.

How To Repeat

Encrypt a file as a binary (non-ASCII armored!) and ftp it to a site as ASCII, then retrieve it. Upon decryption, you get messages like "mpi too large" when the real problem is "MSB stripped off all bytes". Could you either add a troubleshooting message to aborted decrypt sessions ("suspect corrupted file") or add a diagnostic for about-to-be-aborted sessions to detect 7-bit files --> "file is supposed to be binary but has no 8-bit bytes, file corrupted?". This is common to me since gpg files are frequently ftp'ed and a common newbie mistake is to use an ASCII ftp session to transfer a binary file. Yee-haw...

TIA,

rob aberg

Fix

Enhance diagnostics and/or error messages.

Release Note

2004-09-29 David Shaw

  • mpicoder.c (mpi_read): If we must fail due to a oversize (generally corrupt) MPI, make sure the number of bytes we read is valid so we can skip the rest of the bad packet (in hopes the whole stream isn't invalid).

    goes into 1.3.91

Event Timeline

werner added a subscriber: gnats-admin.
werner added a subscriber: werner.

There are a lot of ways to corrupt a file and we can't
detect them all. The mpi too large is a quite common error
message in this case, so we should do something about it.

Did what we can reasonably.