mpd/src/protocol
Max Kellermann 421c4ae907 protocol/ArgParser: fix integer overflow in parse_range()
Casting std::numeric_limits<unsigned>::max() to "long" leads to an
overflow if sizeof(unsigned)==sizeof(long), and the result will be -1.

This happens on some 32 bit architectures, for example ARM and WIN32.

Workaround: use std::numeric_limits<int>::max(), which is the largest
signed integer.  Since sizeof(long)>=sizeof(int), this will never
overflow.

Fixes Mantis ticket 0004080.
2014-09-04 17:37:31 +02:00
..
Ack.cxx *: update copyright year to 2013 2013-10-30 23:37:06 +01:00
Ack.hxx *: update copyright year to 2013 2013-10-30 23:37:06 +01:00
ArgParser.cxx protocol/ArgParser: fix integer overflow in parse_range() 2014-09-04 17:37:31 +02:00
ArgParser.hxx *: use references instead of pointers 2013-10-19 18:48:38 +02:00
Result.cxx *: use nullptr instead of NULL 2013-10-28 23:58:17 +01:00
Result.hxx *: use references instead of pointers 2013-10-19 18:48:38 +02:00