summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-12-27 21:41:22 +0000
committerRussell Bryant <russell@russellbryant.com>2007-12-27 21:41:22 +0000
commitb749217bcbdeb7c36bd89718ab981e13ded2a833 (patch)
treec9cb7c8a4bc72a79f226a440fe7a62b3cd272a78 /main
parent05d2bc0fbfc361f933a804824a458ecc0f77f3c7 (diff)
Merged revisions 95024 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r95024 | russell | 2007-12-27 15:40:02 -0600 (Thu, 27 Dec 2007) | 9 lines 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 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 65931ed6d..484ccc224 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4482,6 +4482,9 @@ ast_group_t ast_get_group(const char *s)
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, ","))) {