mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
libcli/security/dom_sid: use (unsigned char) in isdigit()
The man page notes: The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example: Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
1149d39159
commit
4f5737cbf2
@ -145,7 +145,7 @@ bool dom_sid_parse_endp(const char *sidstr,struct dom_sid *sidout,
|
||||
/* Get the revision number. */
|
||||
p = sidstr + 2;
|
||||
|
||||
if (!isdigit(*p)) {
|
||||
if (!isdigit((unsigned char)*p)) {
|
||||
goto format_error;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ bool dom_sid_parse_endp(const char *sidstr,struct dom_sid *sidout,
|
||||
sidout->sid_rev_num = (uint8_t) conv;
|
||||
q++;
|
||||
|
||||
if (!isdigit(*q)) {
|
||||
if (!isdigit((unsigned char)*q)) {
|
||||
goto format_error;
|
||||
}
|
||||
while (q[0] == '0' && isdigit((unsigned char)q[1])) {
|
||||
@ -199,7 +199,7 @@ bool dom_sid_parse_endp(const char *sidstr,struct dom_sid *sidout,
|
||||
q++;
|
||||
|
||||
while (true) {
|
||||
if (!isdigit(*q)) {
|
||||
if (!isdigit((unsigned char)*q)) {
|
||||
goto format_error;
|
||||
}
|
||||
while (q[0] == '0' && isdigit((unsigned char)q[1])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user