[svn-commits] dvossel: branch 1.6.2 r263906 - in /branches/1.6.2: ./ main/strings.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 18 17:49:30 CDT 2010


Author: dvossel
Date: Tue May 18 17:49:26 2010
New Revision: 263906

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=263906
Log:
Merged revisions 263904 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r263904 | dvossel | 2010-05-18 17:48:51 -0500 (Tue, 18 May 2010) | 9 lines
  
  fixes segfault on logging 
  
  (closes issue #17331)
  Reported by: under
  Patches:
        utils.diff uploaded by under (license 914)
        segfault_on_logging.diff uploaded by dvossel (license 671)
  Tested by: under, dvossel
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/strings.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/strings.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/strings.c?view=diff&rev=263906&r1=263905&r2=263906
==============================================================================
--- branches/1.6.2/main/strings.c (original)
+++ branches/1.6.2/main/strings.c Tue May 18 17:49:26 2010
@@ -77,13 +77,14 @@
 		 * reallocate the buffer and return a message telling to retry.
 		 */
 		if (need > (*buf)->__AST_STR_LEN && (max_len == 0 || (*buf)->__AST_STR_LEN < max_len) ) {
+			int len = (int)(*buf)->__AST_STR_LEN;
 			if (max_len && max_len < need) {	/* truncate as needed */
 				need = max_len;
 			} else if (max_len == 0) {	/* if unbounded, give more room for next time */
 				need += 16 + need / 4;
 			}
 			if (0) {	/* debugging */
-				ast_verbose("extend from %d to %d\n", (int)(*buf)->__AST_STR_LEN, need);
+				ast_verbose("extend from %d to %d\n", len, need);
 			}
 			if (
 #if (defined(MALLOC_DEBUG) && !defined(STANDALONE))
@@ -92,7 +93,7 @@
 					ast_str_make_space(buf, need)
 #endif
 				) {
-				ast_verbose("failed to extend from %d to %d\n", (int)(*buf)->__AST_STR_LEN, need);
+				ast_verbose("failed to extend from %d to %d\n", len, need);
 				va_end(aq);
 				return AST_DYNSTR_BUILD_FAILED;
 			}




More information about the svn-commits mailing list