mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-28 10:13:43 +00:00
Merged revisions 106552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines Safely use the strncat() function. (closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3321,7 +3321,7 @@ static int function_macro(struct rpt *myrpt, char *param, char *digitbuf, int co
|
||||
return DC_ERROR;
|
||||
}
|
||||
myrpt->macrotimer = MACROTIME;
|
||||
strncat(myrpt->macrobuf, val, sizeof(myrpt->macrobuf) - 1);
|
||||
strncat(myrpt->macrobuf, val, sizeof(myrpt->macrobuf) - strlen(myrpt->macrobuf) - 1);
|
||||
rpt_mutex_unlock(&myrpt->lock);
|
||||
return DC_COMPLETE;
|
||||
}
|
||||
@@ -3369,7 +3369,7 @@ static int function_gosub(struct rpt *myrpt, char *param, char *digitbuf, int co
|
||||
return DC_ERROR;
|
||||
}
|
||||
myrpt->gosubtimer = GOSUBTIME;
|
||||
strncat(myrpt->gosubbuf, val, sizeof(myrpt->gosubbuf) - 1);
|
||||
strncat(myrpt->gosubbuf, val, sizeof(myrpt->gosubbuf) - strlen(myrpt->gosubbuf) - 1);
|
||||
rpt_mutex_unlock(&myrpt->lock);
|
||||
return DC_COMPLETE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user