[svn-commits] twilson: trunk r311001 - in /trunk: ./ main/tcptls.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Mar 16 14:51:59 CDT 2011
Author: twilson
Date: Wed Mar 16 14:51:55 2011
New Revision: 311001
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311001
Log:
Merged revisions 310999 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r310999 | twilson | 2011-03-16 14:47:59 -0500 (Wed, 16 Mar 2011) | 18 lines
Merged revisions 310998 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r310998 | twilson | 2011-03-16 14:46:36 -0500 (Wed, 16 Mar 2011) | 11 lines
Fix crash on fdopen failure
See security advisory AST-2011-004
(closes issue #18845)
Reported by: cmaj
Patches:
patch-main-tcptls-1.8.3-rc2-open-session-crash-take2.diff.txt uploaded by cmaj (license 830)
patch-main-tcptls-1.8.3-rc2-open-session-crash-take3.diff.txt uploaded by cmaj (license 830)
Tested by: cmaj, twilson
........
................
Modified:
trunk/ (props changed)
trunk/main/tcptls.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/tcptls.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/tcptls.c?view=diff&rev=311001&r1=311000&r2=311001
==============================================================================
--- trunk/main/tcptls.c (original)
+++ trunk/main/tcptls.c Wed Mar 16 14:51:55 2011
@@ -139,8 +139,12 @@
* open a FILE * as appropriate.
*/
if (!tcptls_session->parent->tls_cfg) {
- tcptls_session->f = fdopen(tcptls_session->fd, "w+");
- setvbuf(tcptls_session->f, NULL, _IONBF, 0);
+ if ((tcptls_session->f = fdopen(tcptls_session->fd, "w+"))) {
+ if(setvbuf(tcptls_session->f, NULL, _IONBF, 0)) {
+ fclose(tcptls_session->f);
+ tcptls_session->f = NULL;
+ }
+ }
}
#ifdef DO_SSL
else if ( (tcptls_session->ssl = SSL_new(tcptls_session->parent->tls_cfg->ssl_ctx)) ) {
More information about the svn-commits
mailing list