summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-15 11:19:57 +0100
committerVolker Lendecke <vlendec@samba.org>2011-03-15 12:08:47 +0100
commita6a722b5bac1c0732acdd13e27d9be2e6aea73a1 (patch)
tree4f93fcb757c49d43b273083f4ff2f861cac3e17d /nsswitch/libwbclient
parentd9a58791b0e0c65556c055fcfff970b77d893f39 (diff)
downloadsamba-a6a722b5bac1c0732acdd13e27d9be2e6aea73a1.tar.gz
samba-a6a722b5bac1c0732acdd13e27d9be2e6aea73a1.tar.bz2
samba-a6a722b5bac1c0732acdd13e27d9be2e6aea73a1.zip
libwbclient: CID 2199 -- NULL pointer return
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Mar 15 12:08:48 CET 2011 on sn-devel-104
Diffstat (limited to 'nsswitch/libwbclient')
-rw-r--r--nsswitch/libwbclient/wbc_util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c
index d2783f30d2..6d7a96c898 100644
--- a/nsswitch/libwbclient/wbc_util.c
+++ b/nsswitch/libwbclient/wbc_util.c
@@ -787,6 +787,10 @@ wbcErr wbcAddNamedBlob(size_t *num_blobs,
*num_blobs + 2, sizeof(struct wbcNamedBlob),
wbcNamedBlobDestructor);
+ if (blobs == NULL) {
+ return WBC_ERR_NO_MEMORY;
+ }
+
if (*pblobs != NULL) {
struct wbcNamedBlob *old = *pblobs;
memcpy(blobs, old, sizeof(struct wbcNamedBlob) * (*num_blobs));