https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r280879 | tilghman | 2010-08-04 09:04:07 -0500 (Wed, 04 Aug 2010) | 14 lines
Check cur value before attempting a deref.
(closes issue #17775)
Reported by: svinson
Patches:
20100804__issue17775.diff.txt uploaded by tilghman (license 14)
Tested by: svinson
(closes issue #17743)
Reported by: tgruenberg
Patches:
20100804__issue17775.diff.txt uploaded by tilghman (license 14)
Tested by: tgruenberg
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@280880
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (sscanf(req->identifier, "%30d", &seqno) != 1) {
seqno = 0;
}
- for (cur = sub->parent->parent->responses, next = cur->next; cur; cur = next, next = cur->next) {
+ for (cur = sub->parent->parent->responses, next = cur ? cur->next : NULL; cur; cur = next, next = cur ? cur->next : NULL) {
if (now - cur->whensent > RESPONSE_TIMEOUT) {
/* Delete this entry */
if (prev)