-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
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
exiv2 crashes due to assertion '__n < this->size()' failed. #1706
Comments
The problem here is related to this tag:
Apparently Does anybody know where the type checking is supposed to happen? |
One possible solution is to refuse to print when the type of the value doesn't match what we expected:
I think that might be too aggressive though. Based on what @clanmills told me, the metadata often doesn't match what it says in manufacturer's specification, so that might prevent us from printing useful information for legitimate files. I also suspect that the above solution isn't sufficient against malicious files. It looks to me like there are other ways to create a |
* Regression test for #1706 * Use vector::at() rather than operator[]. * Print to stderr when exception is caught and EXIV2_DEBUG_MESSAGES is enabled. * Check that it prints "Bad value" for the date.
* fix: use vector::at() rather than operator[] (#1735) * Regression test for #1706 * Use vector::at() rather than operator[]. * Print to stderr when exception is caught and EXIV2_DEBUG_MESSAGES is enabled. * Check that it prints "Bad value" for the date. (cherry picked from commit f4d3adb) # Conflicts: # src/value.cpp * fix merge conflicts from mergify backport Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com> Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
Should be fixed in |
Hi there,
I crashed
exiv2
with a fuzzer generated input, which could causeAssertion '__n < this->size()' failed.
exiv2 -PE poc
. You can download the poc from here pocgdb bt outputs for your convenience:
The text was updated successfully, but these errors were encountered: