mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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
This commit is contained in:
committed by
Friendly Automation
parent
4e514419d9
commit
f9ba1ee7c9
@@ -1967,7 +1967,7 @@ static void *__analog_ss_thread(void *data)
|
||||
* this as a complete spill for the purposes of setting anistart */
|
||||
if ((res > 0) || (strlen(anibuf) >= 2)) {
|
||||
char anistart[2] = "X";
|
||||
char f[10] = {0};
|
||||
char f[101] = {0};
|
||||
if (strchr("#ABC", anibuf[strlen(anibuf) - 1])) {
|
||||
anistart[0] = anibuf[strlen(anibuf) - 1];
|
||||
anibuf[strlen(anibuf) - 1] = 0;
|
||||
|
Reference in New Issue
Block a user