Skip to content

Commit

Permalink
Fix #55 Thank You, Raphaël Hertzog.
Browse files Browse the repository at this point in the history
  • Loading branch information
clanmills authored and D4N committed Oct 15, 2017
1 parent 73a4cdb commit c037d73
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/exiv2/value.hpp
Expand Up @@ -1663,7 +1663,7 @@ namespace Exiv2 {
template<>
inline long ValueType<Rational>::toLong(long n) const
{
ok_ = (value_[n].second != 0);
ok_ = (value_[n].second != 0 && INT_MIN < value_[n].first && value_[n].first < INT_MAX );
if (!ok_) return 0;
return value_[n].first / value_[n].second;
}
Expand Down
9 changes: 9 additions & 0 deletions test/bugfixes-test.sh
Expand Up @@ -602,6 +602,7 @@ source ./functions.source
runTest exiv2 -pX $filename | xmllint --format -

num=1231
printf "$num " >&3
for X in a b; do
filename=exiv2-bug$num$X.jpg
echo '------>' Bug $filename '<-------' >&2
Expand All @@ -622,13 +623,21 @@ source ./functions.source
runTest exiv2 -pa $filename

num=1252
printf "$num " >&3
for X in a b; do
filename=exiv2-bug$num$X.exv
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
done

num=g55
printf "$num " >&3
filename=POC8
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename 2>/dev/null

) 3>&1 > $results 2>&1

printf "\n"
Expand Down
Binary file modified test/data/bugfixes-test.out
Binary file not shown.

0 comments on commit c037d73

Please sign in to comment.