]> git.decadent.org.uk Git - nfs-utils.git/commit - utils/idmapd/idmapd.c
idmapd: Fix decoding of octal encoded fields
authorJan-Marek Glogowski <glogow@fbihome.de>
Tue, 20 Sep 2011 18:33:22 +0000 (14:33 -0400)
committerLuk Claes <luk@debian.org>
Sun, 2 Oct 2011 14:16:48 +0000 (16:16 +0200)
commiteabbf0963d28735657f93da60fc098ee99b69858
tree46b0c838f96d420dfc4bbeba168efe758807be03
parent0e0cacea623d6a2df8877b2f9c8c9edf8290a3b8
idmapd: Fix decoding of octal encoded fields

The decoded octal will always be positive and (char) -1 is negative. Any
field containing an encoded octal will be rejected.

As the encoded value should be an unsigned char, fix the check to reject
all values > (unsigned char) -1 = UCHAR_MAX, as this indicate an error
in the encoding.

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/idmapd/idmapd.c