diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-08-08 02:42:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:31 -0500 |
commit | ede70c80e88bab269795a6ee403050c64fbc9292 (patch) | |
tree | 2564c14b66c7033153bced17bc45cba498fcc628 /source4/dsdb | |
parent | ac4c941b77a2204c6f2eb75f7a28d8fb708909da (diff) | |
download | samba-ede70c80e88bab269795a6ee403050c64fbc9292.tar.gz samba-ede70c80e88bab269795a6ee403050c64fbc9292.tar.bz2 samba-ede70c80e88bab269795a6ee403050c64fbc9292.zip |
r9208: fix a crash bug
metze
(This used to be commit f8a25ac2397d50359f4903618832da7886d91d6f)
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 757ed7be1d..ea89899f8e 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -399,9 +399,10 @@ struct dom_sid *samdb_result_sid_prefix(TALLOC_CTX *mem_ctx, struct ldb_message /* pull a NTTIME in a result set. */ -NTTIME samdb_result_nttime(struct ldb_message *msg, const char *attr, const char *default_value) +NTTIME samdb_result_nttime(struct ldb_message *msg, const char *attr, NTTIME default_value) { - const char *str = ldb_msg_find_string(msg, attr, default_value); + const char *str = ldb_msg_find_string(msg, attr, NULL); + if (!str) return default_value; return nttime_from_string(str); } |