aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2011-12-15 21:46:28 +0000
committerDavid Shaw <[email protected]>2011-12-15 22:00:40 +0000
commita98260c39f1c0ccdad004784cbc9440376766082 (patch)
treef449c1b7adef0bf76d6616ee37b6db6589b3552f
parentscd: Prefer application Geldkarte over DINSIG. (diff)
downloadgnupg-a98260c39f1c0ccdad004784cbc9440376766082.tar.gz
gnupg-a98260c39f1c0ccdad004784cbc9440376766082.zip
Merge fix for issue 1331 from 1.4.
* photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first.
-rw-r--r--g10/photoid.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/g10/photoid.c b/g10/photoid.c
index 9045f0c16..c3d2745a8 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -1,5 +1,5 @@
/* photoid.c - photo ID handling code
- * Copyright (C) 2001, 2002, 2005, 2006, 2008 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2005, 2006, 2008, 2011 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -141,8 +141,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name)
iobuf_close(file);
/* Is it a JPEG? */
- if(photo[0]!=0xFF || photo[1]!=0xD8 ||
- photo[6]!='J' || photo[7]!='F' || photo[8]!='I' || photo[9]!='F')
+ if(photo[0]!=0xFF || photo[1]!=0xD8)
{
log_error(_("`%s' is not a JPEG file\n"),filename);
xfree(photo);