From: stsp Date: Mon, 23 Aug 2021 08:59:31 +0000 (+0000) Subject: Fix the initial length check in iwx_fill_probe_req() to match iwm(4). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7708ad557f56a5f9fdf2d2d137b0e458e804a9be;p=openbsd Fix the initial length check in iwx_fill_probe_req() to match iwm(4). Patch by zxystd from OpenIntelWireless. --- diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 8dc496174be..1fc07f62f52 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.95 2021/08/20 01:33:44 kevlo Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.96 2021/08/23 08:59:31 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -5594,7 +5594,7 @@ iwx_fill_probe_req(struct iwx_softc *sc, struct iwx_scan_probe_req *preq) memset(preq, 0, sizeof(*preq)); - if (remain < sizeof(*wh) + 2 + ic->ic_des_esslen) + if (remain < sizeof(*wh) + 2) return ENOBUFS; /*