Skip to content

Commit f9ba1ee

Browse files
InterLinked1Friendly Automation
authored and
Friendly Automation
committed
sig_analog: Fix truncated buffer copy
Fixes compiler warning caused by a truncated copy of the ANI2 into a buffer of size 10. This could prevent the null terminator from being copied if the copy value exceeds the size of the buffer. This increases the buffer size to 101 to ensure there is no way for truncation to occur. ASTERISK-29702 #close Change-Id: Ief9052212952840fa44de6463b8699fdb3e163d0
1 parent 4e51441 commit f9ba1ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

channels/sig_analog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ static void *__analog_ss_thread(void *data)
19671967
* this as a complete spill for the purposes of setting anistart */
19681968
if ((res > 0) || (strlen(anibuf) >= 2)) {
19691969
char anistart[2] = "X";
1970-
char f[10] = {0};
1970+
char f[101] = {0};
19711971
if (strchr("#ABC", anibuf[strlen(anibuf) - 1])) {
19721972
anistart[0] = anibuf[strlen(anibuf) - 1];
19731973
anibuf[strlen(anibuf) - 1] = 0;

0 commit comments

Comments
 (0)