Handle integer over/under-flow in ast_parse_args
authorTerry Wilson <twilson@digium.com>
Thu, 16 Aug 2012 23:08:40 +0000 (23:08 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 16 Aug 2012 23:08:40 +0000 (23:08 +0000)
commit69dc8e3adb8d1255a1ca088472001dc3b27d069f
tree6c33da70229a03a4040df2829f107fba25ae01a7
parent34265d52654ddb2171a10a1b67bdfa4eb10906e1
Handle integer over/under-flow in ast_parse_args

The strtol family of functions will return *_MIN/*_MAX on overflow. To
detect when an overflow has happened, errno must be set to 0 before
calling the function, then checked afterward.

(closes issue ASTERISK-20120)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2073/
........

Merged revisions 371392 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371398 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 371399 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/config.c