[asterisk-commits] russell: trunk r283210 - in /trunk: ./ main/cel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 23 08:09:51 CDT 2010


Author: russell
Date: Mon Aug 23 08:09:47 2010
New Revision: 283210

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=283210
Log:
Merged revisions 283209 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r283209 | russell | 2010-08-23 08:06:57 -0500 (Mon, 23 Aug 2010) | 2 lines
  
  Don't blow up on an invalid AMA flag.
........

Modified:
    trunk/   (props changed)
    trunk/main/cel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cel.c?view=diff&rev=283210&r1=283209&r2=283210
==============================================================================
--- trunk/main/cel.c (original)
+++ trunk/main/cel.c Mon Aug 23 08:09:47 2010
@@ -349,6 +349,11 @@
 
 const char *ast_cel_get_ama_flag_name(enum ast_cel_ama_flag flag)
 {
+	if (flag < 0 || flag >= ARRAY_LEN(cel_ama_flags)) {
+		ast_log(LOG_WARNING, "Invalid AMA flag: %d\n", flag);
+		return "Unknown";
+	}
+
 	return S_OR(cel_ama_flags[flag], "Unknown");
 }
 




More information about the asterisk-commits mailing list