diff options
author | ace20022 <ace20022@ymail.com> | 2015-07-10 10:36:12 +0200 |
---|---|---|
committer | ace20022 <ace20022@xbmc.org> | 2015-07-10 16:33:54 +0200 |
commit | aaca505a05420694040283105a6a3b19d8a33b5c (patch) | |
tree | 4b67748259ad3f007593e726c5deb20a93eaf474 /lib/libexif | |
parent | 39cb6232250c2e99f165f34caf7c747c0e3c5f5f (diff) |
[fix][libexif] Fix mixing of file comments and exif comments.
Diffstat (limited to 'lib/libexif')
-rw-r--r-- | lib/libexif/JpegParse.cpp | 3 | ||||
-rw-r--r-- | lib/libexif/libexif.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libexif/JpegParse.cpp b/lib/libexif/JpegParse.cpp index 18f1a83e7a..afe940ad67 100644 --- a/lib/libexif/JpegParse.cpp +++ b/lib/libexif/JpegParse.cpp @@ -200,7 +200,8 @@ bool CJpegParse::ExtractInfo (FILE *infile) if (m_SectionBuffer != NULL) { // CExifParse::FixComment(comment); // Ensure comment is printable - strncpy(m_ExifInfo.Comments, (char *)&m_SectionBuffer[2], min(itemlen-2, MAX_COMMENT)); + unsigned short length = min(itemlen - 2, MAX_COMMENT); + strncpy(m_ExifInfo.FileComment, (char *)&m_SectionBuffer[2], length); } ReleaseSection(); break; diff --git a/lib/libexif/libexif.h b/lib/libexif/libexif.h index d27c4d00c7..daed07097f 100644 --- a/lib/libexif/libexif.h +++ b/lib/libexif/libexif.h @@ -109,6 +109,7 @@ typedef struct { int LightSource; int CommentsCharset; // EXIF_COMMENT_CHARSET_* char Comments[MAX_COMMENT]; + char FileComment[MAX_COMMENT]; char Description[MAX_COMMENT]; unsigned ThumbnailOffset; // Exif offset to thumbnail |