git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fed55d6
)
r16322: Klocwork #481., Don't deref null on malloc fail.
author
Jeremy Allison
<jra@samba.org>
Fri, 16 Jun 2006 23:14:12 +0000
(23:14 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:17:33 +0000
(11:17 -0500)
Jeremy.
source/libads/ldap.c
patch
|
blob
|
history
diff --git
a/source/libads/ldap.c
b/source/libads/ldap.c
index 7fb5dac51bbee4d3b51e139eb2f28bd3e7458bd9..be15643ba2f01ec8952bac1de55b283b73377c48 100644
(file)
--- a/
source/libads/ldap.c
+++ b/
source/libads/ldap.c
@@
-1956,8
+1956,10
@@
char **ads_pull_strings_range(ADS_STRUCT *ads,
return NULL;
}
- memcpy(&strings[*num_strings], new_strings,
- sizeof(*new_strings) * num_new_strings);
+ if (new_strings && num_new_strings) {
+ memcpy(&strings[*num_strings], new_strings,
+ sizeof(*new_strings) * num_new_strings);
+ }
(*num_strings) += num_new_strings;