iscsi: check provided data_len for negative value during param negotiation
Change-Id: Icb7184a88d93a55aa53e94bf50dab645785a6d9c Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/434178 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
f0bd658fd5
commit
f7561e31de
@ -886,6 +886,10 @@ spdk_iscsi_negotiate_params(struct spdk_iscsi_conn *conn,
|
||||
int type;
|
||||
|
||||
total = data_len;
|
||||
if (data_len < 0) {
|
||||
assert(false);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (alloc_len < 1) {
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user