GCC warns about the name being truncated here - in theory it will indeed behave unexpectedly if the user has a device in /dev with a 255 character name beginning with "video", but this is probably a niche use-case. --- libavdevice/v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 10a0ff0dd6..ba2505769d 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -1042,7 +1042,7 @@ static int v4l2_get_device_list(AVFormatContext *ctx, AVDeviceInfoList *device_l return ret; } while ((entry = readdir(dir))) { - char device_name[256]; + char device_name[sizeof(entry->d_name) + 8]; if (!v4l2_is_v4l_dev(entry->d_name)) continue; -- 2.19.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel