A float point exception in the printLong function in tags_int.cpp of Exiv2 0.27.99.0 allows attackers to cause a denial of service (DOS) via a crafted tif file.
cpe:2.3:a:exiv2:exiv2:0.27.99.0:*:*:*:*:*:*:*
B5688A15-F378-451E-9D5B-44082AC687E3
OR
POC:
[fpe_poc.zip](https://github.com/Exiv2/exiv2/files/3006099/fpe_poc.zip)

gdb --args ./exiv2 -pt ~/fpe_poc

Program received signal SIGFPE, Arithmetic exception.
0xb7e0c1a2 in Exiv2::Internal::printLong (os=..., value=...) at /home/rookie/exiv2-master/src/tags_int.cpp:2197
2197	        if (r.second != 0) return os << static_cast<long>(r.first) / r.second;
(gdb) bt
#0  0xb7e0c1a2 in Exiv2::Internal::printLong (os=..., value=...) at /home/rookie/exiv2-master/src/tags_int.cpp:2197
#1  0xb7c18f93 in Exiv2::Exifdatum::write (this=0x80d5878, os=..., pMetadata=<optimized out>) at /home/rookie/exiv2-master/src/exif.cpp:227
#2  0xb7c92723 in Exiv2::Metadatum::print (this=<optimized out>, pMetadata=0x80cbcb0) at /home/rookie/exiv2-master/src/metadatum.cpp:74
#3  0x080831ec in Action::Print::printMetadatum (this=<optimized out>, md=..., pImage=<optimized out>) at /home/rookie/exiv2-master/src/actions.cpp:745
#4  0x0807ff5c in Action::Print::printMetadata (this=<optimized out>, image=<optimized out>) at /home/rookie/exiv2-master/src/actions.cpp:542
#5  0x0807e113 in Action::Print::printList (this=0x80cbb20) at /home/rookie/exiv2-master/src/actions.cpp:531
#6  0x08070c67 in Action::Print::run (this=0x80cbb20, path="/home/rookie/fpe_poc") at /home/rookie/exiv2-master/src/actions.cpp:248
#7  0x0804dd9b in main (argc=<optimized out>, argv=<optimized out>) at /home/rookie/exiv2-master/src/exiv2.cpp:172

float point exception in printLong function in tags_int.cpp
This is a GitHub Issue
repo:exiv2
owner:Exiv2
Title : float point exception in printLong function in tags_int.cpp
Issue date:

--- start body ---
POC:
[fpe_poc.zip](https://github.com/Exiv2/exiv2/files/3006099/fpe_poc.zip)

gdb --args ./exiv2 -pt ~/fpe_poc

Program received signal SIGFPE, Arithmetic exception.
0xb7e0c1a2 in Exiv2::Internal::printLong (os=..., value=...) at /home/rookie/exiv2-master/src/tags_int.cpp:2197
2197	        if (r.second != 0) return os << static_cast<long>(r.first) / r.second;
(gdb) bt
#0  0xb7e0c1a2 in Exiv2::Internal::printLong (os=..., value=...) at /home/rookie/exiv2-master/src/tags_int.cpp:2197
#1  0xb7c18f93 in Exiv2::Exifdatum::write (this=0x80d5878, os=..., pMetadata=<optimized out>) at /home/rookie/exiv2-master/src/exif.cpp:227
#2  0xb7c92723 in Exiv2::Metadatum::print (this=<optimized out>, pMetadata=0x80cbcb0) at /home/rookie/exiv2-master/src/metadatum.cpp:74
#3  0x080831ec in Action::Print::printMetadatum (this=<optimized out>, md=..., pImage=<optimized out>) at /home/rookie/exiv2-master/src/actions.cpp:745
#4  0x0807ff5c in Action::Print::printMetadata (this=<optimized out>, image=<optimized out>) at /home/rookie/exiv2-master/src/actions.cpp:542
#5  0x0807e113 in Action::Print::printList (this=0x80cbb20) at /home/rookie/exiv2-master/src/actions.cpp:531
#6  0x08070c67 in Action::Print::run (this=0x80cbb20, path="/home/rookie/fpe_poc") at /home/rookie/exiv2-master/src/actions.cpp:248
#7  0x0804dd9b in main (argc=<optimized out>, argv=<optimized out>) at /home/rookie/exiv2-master/src/exiv2.cpp:172

--- end body ---

comments :
--- start comments ---

--- end comments ---