Comments (4)
In some very distant past, I used to write the metadata parsing code of taglib-sharp.
I ran the image above through the debug utilities from that one which yielded the following:
Tags in object : TiffIFD, XMP
Comment :
Keywords : 2007-09-10 Extreme Blue Expo + London Extreme Blue
Rating :
DateTime : 9/12/2007 4:12:32 PM
Orientation : TopLeft
Software :
ExposureTime : 0.00625
FNumber : 10
ISOSpeedRatings : 800
FocalLength : 48
FocalLength35mm :
Make : Canon
Model : Canon EOS 350D DIGITAL
Width : 3091
Height : 2057
Type : JFIF File
Writable? : False
Corrupt? : True
* Impossibly large item count
* Invalid IFD offset
So this file has known quirks. I'll have a look at how they're detect and how we can work around them in goexif2.
Also interesting: we have a little tool that strips image data from files. This allows you to make super-tiny JPEG files for unit tests. Over here: https://github.com/mono/taglib-sharp/blob/master/examples/StripImageData.cs
from goexif2.
First one:
if (count > 0x10000000) {
// Some Nikon files are known to exhibit this corruption (or "feature").
file.MarkAsCorrupt ("Impossibly large item count");
return null;
}
Happens while parsing the IFD.
Second one:
if (base_offset + offset > length) {
file.MarkAsCorrupt ("Invalid IFD offset");
return 0;
}
So there might be a pointer pointing outside of the image file.
from goexif2.
PR submitted (#13), turned out to be an IFD offset pointing outside of the file (int32(1852796448)
).
from goexif2.
Thank you for your contribution. For easy vendoring I have released v1.1.0
from goexif2.
Related Issues (7)
- parse3Rat2 returns NaN rather than error or 0.0 HOT 1
- would be cool to use releases and semantic versioning HOT 2
- Problem using exif.MarshalJSON() on sample images HOT 4
- Any plans to support exif in mp4 and other video files? HOT 2
- Panic: runtime error: makeslice: len out of range in tiff.(*Tag).convertVals HOT 3
- Crash when exif.MakerNote is empty in Parse (Nikon) + Code to fix it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goexif2.