diff options
author | 2016-02-07 12:16:24 +0000 | |
---|---|---|
committer | 2016-02-07 12:16:24 +0000 | |
commit | 56be46fd5af7057f1575a8256eb4d945caaa156a (patch) | |
tree | ccf1606075f3d8b87020c49f86511fb789a63c00 | |
parent | avoid a use after free when parsing address ranges from a config (diff) | |
download | wireguard-openbsd-56be46fd5af7057f1575a8256eb4d945caaa156a.tar.xz wireguard-openbsd-56be46fd5af7057f1575a8256eb4d945caaa156a.zip |
Make sure the maximum iwm(4) firmware command payload size fits into
the 12 bits available for it in struct iwm_tfd_tb.hi_n_len.
Patch by Imre Vadasz via tech@
-rw-r--r-- | sys/dev/pci/if_iwmreg.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h index fb6b93aaf2a..adfda2b53f2 100644 --- a/sys/dev/pci/if_iwmreg.h +++ b/sys/dev/pci/if_iwmreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwmreg.h,v 1.9 2015/12/14 08:34:56 stsp Exp $ */ +/* $OpenBSD: if_iwmreg.h,v 1.10 2016/02/07 12:16:24 stsp Exp $ */ /****************************************************************************** * @@ -5231,7 +5231,7 @@ enum iwm_power_scheme { }; #define IWM_DEF_CMD_PAYLOAD_SIZE 320 -#define IWM_MAX_CMD_PAYLOAD_SIZE (4096 - sizeof(struct iwm_cmd_header)) +#define IWM_MAX_CMD_PAYLOAD_SIZE ((4096 - 4) - sizeof(struct iwm_cmd_header)) #define IWM_CMD_FAILED_MSK 0x40 struct iwm_device_cmd { |