len=0 is invalid, len=8 is an empty array, len>8 is an array with members, so
for the len=8 case we must add the empty cnid array.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
+++ /dev/null
-^samba4.local.mdspkt.empty_cnid_fm\(none\)
return -1;
}
- if (length <= 16) {
+ if (length < 8) {
+ return -1;
+ }
+ if (length == 8) {
/*
- * That's permitted, iirc length = 16 is an empty
- * array, so anything lesser then 16 should probably
- * be treated as an error, but I'm not quite sure.
+ * That's permitted, length=8 is an empty CNID array.
*/
+ result = dalloc_add(query, cnids, sl_cnids_t);
+ if (result != 0) {
+ return -1;
+ }
return 0;
}