aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-27 21:41:22 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-27 21:41:22 +0000
commit80b48d41c558aac5cf8906b96d41a5264f04bea1 (patch)
treec9cb7c8a4bc72a79f226a440fe7a62b3cd272a78
parentd35e2bf77c6405ca52f90d72eadf5fb84d7df6e4 (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: http://svn.digium.com/svn/asterisk/trunk@95025 f38db490-d61c-443f-a65b-d21fe96a405b
-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, ","))) {