100% CPU with large XMP field

Started by llazon, October 07, 2024, 05:30:24 PM

Previous topic - Next topic

llazon

We came across a set of images that have large XMP data fields.  We see exiftool hang at 100% cpu on this image.  It doesn't timeout or throw errors, just hangs there.  I can recreate this with ExifTool 12.97 on MacOS and Linux.
 
Phil, can I send this image to you privately?

Phil Harvey

Sure:  philharvey66 at gmail.com

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

llazon

Thanks.  Sent.  It appears to be struggling with a huge chunk of data, starting with:

GImage:Data="/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBw...

Phil Harvey

I got the file, thanks.

The XMP ImageData is corrupted somehow, but I will patch ExifTool so it doesn't hang on this file.  It appears to be a Perl bug, but I have a work-around.  Version 12.98 will have this patch.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

FrankB

Quote from: llazon on October 07, 2024, 08:52:08 PMGImage:Data="/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBw...

Not only is it huge, it also contains invalid XML characters. Like '<'. Making it invalid XML.
To me it looks like the string is not escaped properly for XML usage.

Edit: I'm only checking the effect on ExifToolGui!

Phil Harvey

As I said, the data is corrupted.  It is base-64 encoded, so should only contain letters, numbers, +, / and = characters.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

llazon

Awesome, thank you.  I'll keep an eye out for 12.89.  I did find other XMP Data fields like this in other Samsung Galaxy Note 2 photos so I expect there are a few of these floating around in the wild!