summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0e0cace)
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>
if (*bp == '\\') {
if ((n = sscanf(bp, "\\%03o", &val)) != 1)
return (-1);
if (*bp == '\\') {
if ((n = sscanf(bp, "\\%03o", &val)) != 1)
return (-1);
bp += 4;
} else {
*fld++ = *bp;
bp += 4;
} else {
*fld++ = *bp;