[asterisk-commits] file: branch group/media_formats r406938 - /team/group/media_formats/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 30 14:41:39 CST 2014


Author: file
Date: Thu Jan 30 14:41:37 2014
New Revision: 406938

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406938
Log:
Fix a crash if no name is provided when querying the format cache.

Modified:
    team/group/media_formats/main/format_cache.c

Modified: team/group/media_formats/main/format_cache.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/main/format_cache.c?view=diff&rev=406938&r1=406937&r2=406938
==============================================================================
--- team/group/media_formats/main/format_cache.c (original)
+++ team/group/media_formats/main/format_cache.c Thu Jan 30 14:41:37 2014
@@ -165,6 +165,10 @@
 	struct cached_format *cached_format;
 	struct ast_format *format;
 
+	if (ast_strlen_zero(name)) {
+		return NULL;
+	}
+
 	cached_format = ao2_find(formats, name, OBJ_SEARCH_KEY);
 	if (!cached_format) {
 		return NULL;




More information about the asterisk-commits mailing list