mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
initialize the dynamic string in a sane way.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2770,7 +2770,7 @@ static char *generic_http_callback(enum output_format format,
|
||||
/* always return something even if len == 0 */
|
||||
if ((buf = ast_calloc(1, len+1))) {
|
||||
if (!s->outputstr)
|
||||
s->outputstr = ast_calloc(1, sizeof(*s->outputstr));
|
||||
s->outputstr = ast_dynamic_str_create(len+1);
|
||||
if (len > 0 && s->outputstr) {
|
||||
lseek(s->fd, 0, SEEK_SET);
|
||||
read(s->fd, buf, len);
|
||||
|
||||
Reference in New Issue
Block a user