[asterisk-commits] kmoore: trunk r402711 - in /trunk: ./ channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 12 09:03:20 CST 2013
Author: kmoore
Date: Tue Nov 12 09:03:18 2013
New Revision: 402711
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402711
Log:
chan_dahdi: Fix crash during caller ID read
Asterisk will sometimes core dump during caller id read on analog
channels due to a negative return value from the read() in
my_get_callerid that slips through as a negative length argument to
callerid_feed() if the errno returned by DAHDI is ELAST. This change
ensures that the negative return is treated properly even when it is
ELAST.
(closes issue ASTERISK-22746)
Reported by: Michael Walton
Patch by: Michael Walton
........
Merged revisions 402708 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 402709 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 402710 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/channels/chan_dahdi.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Tue Nov 12 09:03:18 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402570,402582,402584,402593,402606,402647,402687
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402570,402582,402584,402593,402606,402647,402687,402710
Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=402711&r1=402710&r2=402711
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Nov 12 09:03:18 2013
@@ -1219,11 +1219,8 @@
* a failure and die, and returning 2 means no event was received. */
res = read(p->subs[index].dfd, buf, sizeof(buf));
if (res < 0) {
- if (errno != ELAST) {
- ast_log(LOG_WARNING, "read returned error: %s\n", strerror(errno));
- callerid_free(p->cs);
- return -1;
- }
+ ast_log(LOG_WARNING, "read returned error: %s\n", strerror(errno));
+ return -1;
}
if (analog_p->ringt > 0) {
More information about the asterisk-commits
mailing list