File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1138,9 +1138,12 @@ static void _find_datetime_taken(Exiv2::ExifData &exifData,
11381138 // Note: We allow a longer "datetime original" field with an unnecessary
11391139 // trailing byte(s) due to buggy software that creates it.
11401140 // See https://github.com/darktable-org/darktable/issues/17389
1141+ // We also accept the out of spec Exif.Photo.DateTimeOriginal
1142+ // without a null terminator, which AnalogExif creates.
1143+ // See https://github.com/darktable-org/darktable/issues/18146
11411144 if ((FIND_EXIF_TAG (" Exif.Image.DateTimeOriginal" )
11421145 || FIND_EXIF_TAG (" Exif.Photo.DateTimeOriginal" ))
1143- && pos->size () >= DT_DATETIME_EXIF_LENGTH)
1146+ && pos->size () >= DT_DATETIME_EXIF_LENGTH - 1 )
11441147 {
11451148 _strlcpy_to_utf8 (exif_datetime_taken, DT_DATETIME_EXIF_LENGTH, pos, exifData);
11461149 if (FIND_EXIF_TAG (" Exif.Photo.SubSecTimeOriginal" )
You can’t perform that action at this time.
0 commit comments