[x265] getopt_long() lets through ambiguous arguments like --nr
Joshua Bowman
silverbacknet at gmail.com
Wed Jul 11 06:36:48 CEST 2018
GNU getopt allows abbreviated options, but it really SHOULD blow up when an
argument short-matches a name twice; instead it just merrily takes the
first one. It seems to be designed to allow a developer to brain fart and
insert the exact same argument twice without error, and this patch will
still allow that, but it WILL prevent something like --nr that matches both
--nr-intra and --nr-inter from just silently using the first match. For
some reason, no one ever thought to compare the actual argument names.
This doesn't patch the -W path. No one cares about POSIX -W.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180710/36879b91/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-getopt-ambiguous.diff
Type: application/octet-stream
Size: 448 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180710/36879b91/attachment.obj>
More information about the x265-devel
mailing list