mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 16:15:04 +00:00
[test] Fix out of bound buffer read in switch_test
This commit is contained in:
parent
b630dfa79e
commit
bc9515468e
@ -863,7 +863,7 @@ cJSON *varname = NULL; \
|
||||
int fd = open(file, O_RDONLY); \
|
||||
fst_requires(fd >= 0); \
|
||||
fstat(fd, &s); \
|
||||
buf = malloc(s.st_size + 1); \
|
||||
switch_zmalloc(buf, s.st_size + 1); \
|
||||
fst_requires(buf); \
|
||||
size = read(fd, buf, s.st_size); \
|
||||
fst_requires(size == s.st_size); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user