While working on Kleo I've noticed a workaround I added there back in 2013
because Klepatra was crashing when a file was larger then 32bit int.
I've checked that this is still happening with latest versions with a small
change to t-encrypt-large:
diff --git a/tests/gpg/t-encrypt-large.c b/tests/gpg/t-encrypt-large.c
index 6cc6138..075b638 100644
- a/tests/gpg/t-encrypt-large.c
+++ b/tests/gpg/t-encrypt-large.c
@@ -69,7 +69,11 @@ write_cb (void *handle, const void *buffer, size_t size)
static void
progress_cb (void *opaque, const char *what, int type, int current, int total)
{
- /* This is just a dummy. */
+ if (current < 0)
+ {
+ fprintf (stderr, "Overflow in progress callback.\n");
+ exit(1);
+ }
}
$ GNUPGHOME=. ./t-encrypt-large 4000000000
Overflow in progress callback.
I suggest that the current progress_cb is deprecated and a new function added
that uses 64 bit (unsigned?) integers.