return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
case NDR_ERR_INVALID_POINTER:
return NT_STATUS_INVALID_PARAMETER_MIX;
+ case NDR_ERR_UNREAD_BYTES:
+ return NT_STATUS_PORT_MESSAGE_TOO_LONG;
default:
break;
}
status = fn(ndr, NDR_SCALARS|NDR_BUFFERS, p);
if (!NT_STATUS_IS_OK(status)) return status;
if (ndr->offset < ndr->data_size) {
- return NT_STATUS_PORT_MESSAGE_TOO_LONG;
+ return ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES,
+ "not all bytes consumed ofs[%u] size[%u]",
+ ndr->offset, ndr->data_size);
}
return NT_STATUS_OK;
}
status = fn(ndr, NDR_SCALARS|NDR_BUFFERS, p);
if (!NT_STATUS_IS_OK(status)) return status;
if (ndr->offset < ndr->data_size) {
- return NT_STATUS_PORT_MESSAGE_TOO_LONG;
+ return ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES,
+ "not all bytes consumed ofs[%u] size[%u]",
+ ndr->offset, ndr->data_size);
}
return NT_STATUS_OK;
}