aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-03-03 05:20:05 +0100
committerJames Almer <jamrial@gmail.com>2020-03-10 15:17:16 -0300
commit6ee7375ef50b6744c33d988c0ea2fb1780a838f0 (patch)
tree6f69e06498f811846b0cdfc140dc0499d539e8d3 /libavfilter/graphparser.c
parentdc1c3c640d245bc3e7a7a4c82ae1a6d06343abab (diff)
downloadffmpeg-6ee7375ef50b6744c33d988c0ea2fb1780a838f0.tar.gz
avcodec/v4l2_m2m: Avoid using intermediate buffer
Up until now, v4l2_m2m would write via snprintf() into an intermediate buffer and then copy from there (via strncpy()) to the end buffer. This commit changes this by removing the intermediate buffer. The call to strncpy() was actually of the form strncpy(dst, src, strlen(src) + 1) which is unsafe in general, but safe in this instance because dst and src were both of the same size and src was a proper zero-terminated string. But this nevertheless led to a compiler warning "‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]" in GCC 9.2. strlen() was unnecessary anyway. Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/graphparser.c')
0 files changed, 0 insertions, 0 deletions