[asterisk-bugs] [Asterisk 0010390]: AST_LIST_REMOVE problems
noreply at bugs.digium.com
noreply at bugs.digium.com
Mon Aug 6 11:33:22 CDT 2007
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=10390
======================================================================
Reported By: mihai
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 10390
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: 1.4.9
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 08-06-2007 10:16 CDT
Last Modified: 08-06-2007 11:33 CDT
======================================================================
Summary: AST_LIST_REMOVE problems
Description:
in linkedlists.h, at or around line 744 we have:
__res = curelm;
This will return the incorrect element (the one before the correct
element). The correct code would be:
__res = curelm->field.next;
Up until now, the return value of AST_LIST_REMOVE was not used anywhere in
Asterisk. However, Russell's latest patch to 10289 makes use of that
return value
Also, if elm is NULL, then AST_LIST_REMOVE will crash. Not checking for
NULL arguments is a more generic problem that is present in other list
related macros as well.
======================================================================
----------------------------------------------------------------------
svnbot - 08-06-07 11:33
----------------------------------------------------------------------
Repository: asterisk
Revision: 78184
------------------------------------------------------------------------
r78184 | russell | 2007-08-06 11:33:21 -0500 (Mon, 06 Aug 2007) | 5 lines
Fix the return value of AST_LIST_REMOVE(). This shouldn't be causing any
problems, though, because the only code that uses the return value only
checks
to see if it is NULL.
(closes issue http://bugs.digium.com/view.php?id=10390, pointed out by mihai)
------------------------------------------------------------------------
Issue History
Date Modified Username Field Change
======================================================================
08-06-07 11:33 svnbot Checkin
08-06-07 11:33 svnbot Note Added: 0068496
08-06-07 11:33 svnbot Status new => assigned
08-06-07 11:33 svnbot Assigned To => russell
======================================================================
More information about the asterisk-bugs
mailing list