mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Fix directory name in SMS (bug #2307)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1069,11 +1069,11 @@ sms_exec(struct ast_channel *chan, void *data)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (p = d; *p && *p != '|'; p++);
|
for (p = d; *p && *p != '|'; p++);
|
||||||
if (p - d >= sizeof (h.queue)) {
|
if (p - d + 1 >= sizeof (h.queue)) {
|
||||||
ast_log (LOG_ERROR, "Queue name too long\n");
|
ast_log (LOG_ERROR, "Queue name too long\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
strncpy(h.queue, d, p - d - 1);
|
strncpy(h.queue, d, p - d);
|
||||||
if (*p == '|')
|
if (*p == '|')
|
||||||
p++;
|
p++;
|
||||||
d = p;
|
d = p;
|
||||||
|
Reference in New Issue
Block a user