parse_options: fail on more malformed options

Graphics / Wayland / Weston - Bill Spitzak [gmail.com] - 11 September 2014 04:36 UTC

Fail on trailing text after numbers, such as --width=100mm

Fail on any text after booleans, such as --flag=false

Also fixed reading of memory after the null terminator of a long option with no = sign in it.

[Pekka Paalanen: some whitespace style fixes.]

3011493 parse_options: fail on more malformed options
shared/option-parser.c | 97 ++++++++++++++++++++++++++++++++++--------------
1 file changed, 69 insertions(+), 28 deletions(-)

Upstream: cgit.freedesktop.org


  • Share