diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-09-12 16:54:44 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-09-12 16:54:44 +0000 |
commit | 8208906a044713cbeec37de16c06a3609648e9a3 (patch) | |
tree | 60f85475d944091eecd2dc7303fc135efda69fd2 /main/app.c | |
parent | 73bf9c063f00545afecbe1bf5d91e5b6be0475b4 (diff) |
When checking for an encoded character, make sure the string isn't blank, first.
(Closes issue #13470)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142748 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r-- | main/app.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/app.c b/main/app.c index 82aab2f41..b7429bff7 100644 --- a/main/app.c +++ b/main/app.c @@ -1748,6 +1748,11 @@ int ast_get_encoded_char(const char *stream, char *result, size_t *consumed) int i; *consumed = 1; *result = 0; + if (ast_strlen_zero(stream)) { + *consumed = 0; + return -1; + } + if (*stream == '\\') { *consumed = 2; switch (*(stream + 1)) { |