[asterisk-commits] tilghman: branch 1.8 r280879 - /branches/1.8/channels/chan_mgcp.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 4 09:04:19 CDT 2010
Author: tilghman
Date: Wed Aug 4 09:04:07 2010
New Revision: 280879
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=280879
Log:
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
Modified:
branches/1.8/channels/chan_mgcp.c
Modified: branches/1.8/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_mgcp.c?view=diff&rev=280879&r1=280878&r2=280879
==============================================================================
--- branches/1.8/channels/chan_mgcp.c (original)
+++ branches/1.8/channels/chan_mgcp.c Wed Aug 4 09:04:07 2010
@@ -3580,7 +3580,7 @@
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)
More information about the asterisk-commits
mailing list