[FFmpeg-devel] [PATCH v2] gdigrab: Allow capturing a window by its handle
Rémi Denis-Courmont
remi at remlab.net
Tue Dec 12 17:31:18 EET 2023
Le 12 décembre 2023 16:07:28 GMT+02:00, Nicolas George <george at nsup.org> a écrit :
>Lena via ffmpeg-devel (12023-12-12):
>> The documentation for `strtol` says that on error, 0 is returned. This
>> makes it impossible to specify a window handle of 0 (the whole
>> desktop), but that case is already covered by the "desktop" input
>> filename, so it should be fine.
>
>The correct way to test for error in strtol is to check the endptr.
...and test for overflow errors in errno.m (which shall have been zeroed beforehand). AFAIK, you need to do both if you want strict error detection.
>
>But just use a single sscanf() and %n to see if it reached the end of
>the string.
Don't some distros forbid the use of the n specifier for (debatable) "security reasons"? Or is that only for formatting, and not in scanning?
>> -There are two options for the input filename:
>> +There are three options for the input filename:
>
>“Amongst options for the imput filenames are such elements as:”
>
>;-)
>
>Regards,
>
>--
> Nicolas George
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list