]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
idmapd: Fix decoding of octal encoded fields
authorJan-Marek Glogowski <glogow@fbihome.de>
Tue, 20 Sep 2011 18:33:22 +0000 (14:33 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 20 Sep 2011 18:34:42 +0000 (14:34 -0400)
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>

No differences found