Le 12 décembre 2023 16:07:28 GMT+02:00, Nicolas George <[email protected]> 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
>[email protected]
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>[email protected] with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to