svn commit: samba r14781 - in trunk/source/passdb: .
jra at samba.org
jra at samba.org
Wed Mar 29 23:23:07 GMT 2006
Author: jra
Date: 2006-03-29 23:23:05 +0000 (Wed, 29 Mar 2006)
New Revision: 14781
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14781
Log:
Fix coverity bug #272, null deref.
Jeremy.
Modified:
trunk/source/passdb/pdb_get_set.c
Changeset:
Modified: trunk/source/passdb/pdb_get_set.c
===================================================================
--- trunk/source/passdb/pdb_get_set.c 2006-03-29 23:22:57 UTC (rev 14780)
+++ trunk/source/passdb/pdb_get_set.c 2006-03-29 23:23:05 UTC (rev 14781)
@@ -228,6 +228,10 @@
TALLOC_CTX *mem_ctx = talloc_init("pdb_get_group_sid");
BOOL lookup_ret;
+ if (!mem_ctx) {
+ return NULL;
+ }
+
/* Now check that it's actually a domain group and not something else */
lookup_ret = lookup_sid(mem_ctx, gsid, NULL, NULL, &type);
@@ -1246,6 +1250,10 @@
/* Ensure we have space for the needed history. */
uchar *new_history = TALLOC(sampass,
pwHistLen*PW_HISTORY_ENTRY_LEN);
+ if (!new_history) {
+ return False;
+ }
+
/* And copy it into the new buffer. */
if (current_history_len) {
memcpy(new_history, pwhistory,
More information about the samba-cvs
mailing list