From 58502b38d3eaf5649c9e09b6af6ea84d726dccd1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 21:53:19 +0200 Subject: *: use std::numeric_limits --- src/tag/Riff.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/tag/Riff.cxx') diff --git a/src/tag/Riff.cxx b/src/tag/Riff.cxx index 3728d281c..ad64afc39 100644 --- a/src/tag/Riff.cxx +++ b/src/tag/Riff.cxx @@ -23,12 +23,11 @@ #include "system/ByteOrder.hxx" #include "Log.hxx" -#include +#include #include #include #include -#include #include static constexpr Domain riff_domain("riff"); @@ -79,7 +78,7 @@ riff_seek_id3(FILE *file) return 0; size = FromLE32(chunk.size); - if (size > G_MAXINT32) + if (size > size_t(std::numeric_limits::max())) /* too dangerous, bail out: possible integer underflow when casting to off_t */ return 0; -- cgit v1.2.3