[asterisk-commits] russell: branch 1.4 r95024 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 27 15:40:03 CST 2007


Author: russell
Date: Thu Dec 27 15:40:02 2007
New Revision: 95024

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95024
Log:
Don't report a syntax error when an empty string is passed to ast_get_group.
Just return 0.

(closes issue #11540)
Reported by: tzafrir
Patches: 
      group_empty.diff uploaded by tzafrir (license 46)
	   -- slightly changed by me

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=95024&r1=95023&r2=95024
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Thu Dec 27 15:40:02 2007
@@ -4596,6 +4596,9 @@
 	int start=0, finish=0, x;
 	ast_group_t group = 0;
 
+	if (ast_strlen_zero(s))
+		return 0;
+
 	c = ast_strdupa(s);
 	
 	while ((piece = strsep(&c, ","))) {




More information about the asterisk-commits mailing list