Bug: https://bugzilla.samba.org/show_bug.cgi?id=11032
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 19 16:17:28 CET 2015 on sn-devel-104
struct tdb_wrap *result;
struct tdb_wrap_private *w;
+ if (name == NULL) {
+ errno = EINVAL;
+ return NULL;
+ }
+
/* If they specify a .ntdb extension, but the code hasn't been
* converted, we want to complain. */
- if (name && strends(name, ".ntdb")) {
+ if (strends(name, ".ntdb")) {
DEBUG(2, ("tdb(%s): This code does not yet understand ntdb. Please report.\n", name));
+ errno = EINVAL;
return NULL;
}