diff options
Diffstat (limited to 'sys/dev/pci/hifn7751.c')
-rw-r--r-- | sys/dev/pci/hifn7751.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c index e6e68cc2f42..8a77196fb34 100644 --- a/sys/dev/pci/hifn7751.c +++ b/sys/dev/pci/hifn7751.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hifn7751.c,v 1.68 2001/06/14 23:51:58 deraadt Exp $ */ +/* $OpenBSD: hifn7751.c,v 1.69 2001/06/14 23:55:02 deraadt Exp $ */ /* * Invertex AEON / Hi/fn 7751 driver @@ -1408,11 +1408,10 @@ hifn_process(crp) m_copyback(cmd->src_m, enccrd->crd_inject, HIFN_IV_LENGTH, cmd->iv); else if (crp->crp_flags & CRYPTO_F_IOV) { - if (crp->crp_iv == NULL) { - err = EINVAL; - goto errout; - } - bcopy(crp->crp_iv, cmd->iv, 8); + if (crp->crp_iv == NULL) + bzero(cmd->iv, 8); + else + bcopy(crp->crp_iv, cmd->iv, 8); } } } else { @@ -1422,11 +1421,10 @@ hifn_process(crp) m_copydata(cmd->src_m, enccrd->crd_inject, HIFN_IV_LENGTH, cmd->iv); else if (crp->crp_flags & CRYPTO_F_IOV) { - if (crp->crp_iv == NULL) { - err = EINVAL; - goto errout; - } - bcopy(crp->crp_iv, cmd->iv, 8); + if (crp->crp_iv == NULL) + bzero(cmd->iv, 8); + else + bcopy(crp->crp_iv, cmd->iv, 8); } } |