mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-20 14:37:08 +01:00
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.
This commit is contained in:
parent
28c6cef128
commit
5a0ed4a2cc
@ -1,5 +1,5 @@
|
|||||||
/* photoid.c - photo ID handling code
|
/* 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.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -141,8 +141,7 @@ generate_photo_id(PKT_public_key *pk,const char *photo_name)
|
|||||||
iobuf_close(file);
|
iobuf_close(file);
|
||||||
|
|
||||||
/* Is it a JPEG? */
|
/* Is it a JPEG? */
|
||||||
if(photo[0]!=0xFF || photo[1]!=0xD8 ||
|
if(photo[0]!=0xFF || photo[1]!=0xD8)
|
||||||
photo[6]!='J' || photo[7]!='F' || photo[8]!='I' || photo[9]!='F')
|
|
||||||
{
|
{
|
||||||
log_error(_("`%s' is not a JPEG file\n"),filename);
|
log_error(_("`%s' is not a JPEG file\n"),filename);
|
||||||
xfree(photo);
|
xfree(photo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user