diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2023-04-21 15:32:01 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2023-04-28 02:15:36 +0000 |
commit | 4f5737cbf2931903216322d68084206280a210ad (patch) | |
tree | f63fe3221cd262a0ce543c8a7ef30138c1531d59 /libcli/security | |
parent | 1149d391592a919c768df0e0959d7987c62fc7de (diff) | |
download | samba-4f5737cbf2931903216322d68084206280a210ad.tar.gz |
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>
Diffstat (limited to 'libcli/security')
-rw-r--r-- | libcli/security/dom_sid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c index 89f2daba0cb..52d4454e4e5 100644 --- a/libcli/security/dom_sid.c +++ b/libcli/security/dom_sid.c @@ -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])) { |