We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Mayank Thanks for the nice and lightweigtht exif library!
I just run into the situation where a 'std::length_error' on string resize was thrown. It boils down to the following line in exif.cpp:350
if (result.val_string()[result.val_string().length() - 1] == '\0') { result.val_string().resize(result.val_string().length() - 1); }
The length of val_string() is not guaranteed to be > 0 and in my case it happend to be empty (resulting in an invalid memory access). The fix is easy:
if (!result.val_string().empty() && result.val_string()[result.val_string().length() - 1] == '\0') { result.val_string().resize(result.val_string().length() - 1); }
Cheers & have a nice day Alex
The text was updated successfully, but these errors were encountered:
The same issue here. Your fix is correct. Thank you !
Sorry, something went wrong.
No branches or pull requests
Hi Mayank
Thanks for the nice and lightweigtht exif library!
I just run into the situation where a 'std::length_error' on string resize was thrown. It boils down to the following line in exif.cpp:350
The length of val_string() is not guaranteed to be > 0 and in my case it happend to be empty (resulting in an invalid memory access). The fix is easy:
Cheers & have a nice day
Alex
The text was updated successfully, but these errors were encountered: