aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.c
diff options
context:
space:
mode:
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",