Commit 7883b2f7 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Jeff Garzik

Fix four similar off-by-one errors in wireless net drvr core.

parent b446946d
...@@ -245,7 +245,8 @@ ...@@ -245,7 +245,8 @@
/* Wrapper level flags */ /* Wrapper level flags */
#define IW_DESCR_FLAG_DUMP 0x0001 /* Not part of the dump command */ #define IW_DESCR_FLAG_DUMP 0x0001 /* Not part of the dump command */
#define IW_DESCR_FLAG_EVENT 0x0002 /* Generate an event on SET */ #define IW_DESCR_FLAG_EVENT 0x0002 /* Generate an event on SET */
#define IW_DESCR_FLAG_RESTRICT 0x0004 /* GET request is ROOT only */ #define IW_DESCR_FLAG_RESTRICT 0x0004 /* GET : request is ROOT only */
/* SET : Omit payload from generated iwevent */
/* Driver level flags */ /* Driver level flags */
#define IW_DESCR_FLAG_WAIT 0x0100 /* Wait for driver event */ #define IW_DESCR_FLAG_WAIT 0x0100 /* Wait for driver event */
......
...@@ -28,11 +28,13 @@ ...@@ -28,11 +28,13 @@
* *
* v3 - 19.12.01 - Jean II * v3 - 19.12.01 - Jean II
* o Make sure we don't go out of standard_ioctl[] in ioctl_standard_call * o Make sure we don't go out of standard_ioctl[] in ioctl_standard_call
* o Fix /proc/net/wireless to handle __u8 to __s8 change in iwqual
* o Add event dispatcher function * o Add event dispatcher function
* o Add event description * o Add event description
* o Propagate events as rtnetlink IFLA_WIRELESS option * o Propagate events as rtnetlink IFLA_WIRELESS option
* o Generate event on selected SET requests * o Generate event on selected SET requests
*
* v4 - 18.04.01 - Jean II
* o Fix stupid off by one in iw_ioctl_description : IW_ESSID_MAX_SIZE + 1
*/ */
/***************************** INCLUDES *****************************/ /***************************** INCLUDES *****************************/
...@@ -122,13 +124,13 @@ static const struct iw_ioctl_description standard_ioctl[] = { ...@@ -122,13 +124,13 @@ static const struct iw_ioctl_description standard_ioctl[] = {
/* SIOCGIWSCAN */ /* SIOCGIWSCAN */
{ IW_HEADER_TYPE_POINT, 0, 1, 0, IW_SCAN_MAX_DATA, 0}, { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_SCAN_MAX_DATA, 0},
/* SIOCSIWESSID */ /* SIOCSIWESSID */
{ IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, IW_DESCR_FLAG_EVENT}, { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, IW_DESCR_FLAG_EVENT},
/* SIOCGIWESSID */ /* SIOCGIWESSID */
{ IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, IW_DESCR_FLAG_DUMP}, { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, IW_DESCR_FLAG_DUMP},
/* SIOCSIWNICKN */ /* SIOCSIWNICKN */
{ IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, 0}, { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, 0},
/* SIOCGIWNICKN */ /* SIOCGIWNICKN */
{ IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE, 0}, { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, 0},
/* -- hole -- */ /* -- hole -- */
{ IW_HEADER_TYPE_NULL, 0, 0, 0, 0, 0}, { IW_HEADER_TYPE_NULL, 0, 0, 0, 0, 0},
/* -- hole -- */ /* -- hole -- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment