diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-05 06:52:41 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-05 06:52:41 +0000 |
commit | 57e05b7e718b465a338dc991a68a012645b8c262 (patch) | |
tree | 1bae3fefa5e51508c422120a746f76da85837b79 | |
parent | df8f2799b662643a2ebfdb8bfee2e88aab178e22 (diff) |
Issue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash (imported from 1.2)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17490 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | CREDITS | 2 | ||||
-rw-r--r-- | enum.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -13,6 +13,8 @@ Telesthetic - for supporting SIP development Christos Ricudis - for substantial code contributions +nic.at - ENUM support in Asterisk + Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development === WISHLIST CONTRIBUTERS === @@ -99,8 +99,8 @@ static int parse_ie(char *data, int maxdatalen, char *src, int srclen) len = olen = (int)src[0]; src++; srclen--; - if (len > srclen) { - ast_log(LOG_WARNING, "Want %d, got %d\n", len, srclen); + if (len > srclen || len < 0 ) { + ast_log(LOG_WARNING, "ENUM parsing failed: Wanted %d characters, got %d\n", len, srclen); return -1; } if (len > maxdatalen) |