util/rfc1738: simplify and fix rfc1738_unescape()
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 19 Feb 2018 01:12:03 +0000 (14:12 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 22 Feb 2018 00:04:18 +0000 (01:04 +0100)
commitc20a3699075369e5516af47100220dab18435a91
tree86ef4dc8a10d71a58407c7fdf404c2430a24fc51
parent9f3e20d98bdc04d6301ab0560cc7fde6ec9cc796
util/rfc1738: simplify and fix rfc1738_unescape()

Improvements:

* NULL is returned when the string is incorrectly formed.

* Badly formed escapes like "% b" that were accepted by sscanf() are now
  rejected.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/rfc1738.c
selftest/knownfail.d/rfc1738