diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-27 21:40:02 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-27 21:40:02 +0000 |
commit | 0788d8e1ebbb0b6a7822650df03d5e73677d02cc (patch) | |
tree | 1c91dbadfee1cb4499daac67505b387fcce55fa0 /main | |
parent | b4b1996ad4a9e2894f3fb0c6809bc3f88bafb4cc (diff) |
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/branches/1.4@95024 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index c644dbe42..0ccf18b75 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4596,6 +4596,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, ","))) { |