git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f287cdb
)
Fix an "invalid operation involving NULL pointer" found by the IBM checker
author
Volker Lendecke
<vl@samba.org>
Fri, 27 Jun 2008 09:19:26 +0000
(11:19 +0200)
committer
Volker Lendecke
<vl@samba.org>
Fri, 27 Jun 2008 09:23:20 +0000
(11:23 +0200)
Jerry, please check!
Volker
(This used to be commit
eb6096a2d488d64cfa86e01be2a97e14e5773fe3
)
source3/nsswitch/libwbclient/wbc_sid.c
patch
|
blob
|
history
diff --git
a/source3/nsswitch/libwbclient/wbc_sid.c
b/source3/nsswitch/libwbclient/wbc_sid.c
index eb115e129765727429d44b96c373367f535f5937..f3d58960f2a0125620db18e40c814e07bd42f852 100644
(file)
--- a/
source3/nsswitch/libwbclient/wbc_sid.c
+++ b/
source3/nsswitch/libwbclient/wbc_sid.c
@@
-141,9
+141,13
@@
wbcErr wbcStringToSid(const char *str,
while (sid->num_auths < WBC_MAXSUBAUTHS) {
if ((x=(uint32_t)strtoul(p, &q, 10)) == 0)
break;
+ if (q == NULL) {
+ wbc_status = WBC_ERR_INVALID_SID;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
sid->sub_auths[sid->num_auths++] = x;
- if (
q && ((*q!='-') || (*q=='\0')
))
+ if (
(*q!='-') || (*q=='\0'
))
break;
p = q + 1;
}