mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
libcli/security: Convert some strtol calls to strtoul
This tightens the dom_sid_parse syntax check a bit: "--" would have been allowed in sid string
This commit is contained in:
parent
7c687665ea
commit
7fe66e06c4
@ -96,13 +96,13 @@ bool dom_sid_parse(const char *sidstr, struct dom_sid *ret)
|
||||
|
||||
sidstr += 2;
|
||||
|
||||
rev = strtol(sidstr, &p, 10);
|
||||
rev = strtoul(sidstr, &p, 10);
|
||||
if (*p != '-') {
|
||||
return false;
|
||||
}
|
||||
sidstr = p+1;
|
||||
|
||||
ia = strtol(sidstr, &p, 10);
|
||||
ia = strtoul(sidstr, &p, 10);
|
||||
if (p == sidstr) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user