aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-10-05 16:58:50 +0000
committerWerner Koch <[email protected]>2005-10-05 16:58:50 +0000
commitbd1df0119c26d14e298d11abdd07ae77e8fb124f (patch)
treeb536179161d11a20fd32df27971f65d952814a88 /g10/photoid.c
parent2005-10-02 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-bd1df0119c26d14e298d11abdd07ae77e8fb124f.tar.gz
gnupg-bd1df0119c26d14e298d11abdd07ae77e8fb124f.zip
Renamed g10.c to gpg.c
Filelength fixes for W32.
Diffstat (limited to '')
-rw-r--r--g10/photoid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/photoid.c b/g10/photoid.c
index 885bbca01..d2a249167 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -53,6 +53,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name)
byte *photo=NULL;
byte header[16];
IOBUF file;
+ int overflow;
header[0]=0x10; /* little side of photo header length */
header[1]=0; /* big side of photo header length */
@@ -119,8 +120,9 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name)
continue;
}
- len=iobuf_get_filelength(file);
- if(len>6144)
+
+ len=iobuf_get_filelength(file, &overflow);
+ if(len>6144 || overflow)
{
tty_printf( _("This JPEG is really large (%d bytes) !\n"),len);
if(!cpr_get_answer_is_yes("photoid.jpeg.size",