Fixes:
source3/lib/dbwrap/dbwrap_watch.c:55:3: warning: Array access (from variable 'wkey') results in a null pointer dereference <--[clang]
SIVAL(wkey, 0, db_id_len);
^
1 warning generated.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
return -1;
}
- if (wkey_len >= needed) {
+ if (wkey != NULL && wkey_len >= needed) {
SIVAL(wkey, 0, db_id_len);
memcpy(wkey + sizeof(uint32_t), db_id, db_id_len);
memcpy(wkey + sizeof(uint32_t) + db_id_len,