Re: [FFmpeg-devel] [PATCH 1/2] avcodec/v4l2_m2m: Avoid using intermediate buffer

2020-03-10 Thread James Almer
On 3/10/2020 3:11 PM, Andriy Gelman wrote: > On Tue, 10. Mar 06:37, Andreas Rheinhardt wrote: >> Andreas Rheinhardt: >>> 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 remo

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/v4l2_m2m: Avoid using intermediate buffer

2020-03-10 Thread Andriy Gelman
On Tue, 10. Mar 06:37, Andreas Rheinhardt wrote: > Andreas Rheinhardt: > > 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 cal

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/v4l2_m2m: Avoid using intermediate buffer

2020-03-09 Thread Andreas Rheinhardt
Andreas Rheinhardt: > 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, > s

[FFmpeg-devel] [PATCH 1/2] avcodec/v4l2_m2m: Avoid using intermediate buffer

2020-03-02 Thread Andreas Rheinhardt
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