]> git.proxmox.com Git - mirror_edk2.git/commit
NetworkPkg/IScsiDxe: assert that IScsiBinToHex() always succeeds
authorLaszlo Ersek <lersek@redhat.com>
Tue, 8 Jun 2021 12:12:55 +0000 (14:12 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 9 Jun 2021 17:25:03 +0000 (17:25 +0000)
commitd90fff40cb2502b627370a77f5608c8a178c3f78
tree59b48bb25a07b71959fc83206115df7074d84996
parentcf01b2dc8fc3ff9cf49fb891af5703dc03e3193e
NetworkPkg/IScsiDxe: assert that IScsiBinToHex() always succeeds

IScsiBinToHex() is called for encoding:

- the answer to the target's challenge; that is, CHAP_R;

- the challenge for the target, in case mutual authentication is enabled;
  that is, CHAP_C.

The initiator controls the size of both blobs, the sizes of their hex
encodings are correctly calculated in "RspLen" and "ChallengeLen".
Therefore the IScsiBinToHex() calls never fail; assert that.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3356
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Message-Id: <20210608121259.32451-7-lersek@redhat.com>
NetworkPkg/IScsiDxe/IScsiCHAP.c