* [PATCH] iw: Fix regression in mesh_param input parsing
@ 2009-01-10 1:13 Colin McCabe
2009-01-10 9:14 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Colin McCabe @ 2009-01-10 1:13 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Colin McCabe
In the iw tool, don't crash on bad arguments to "iw dev mesh set mesh_param"
---
mesh.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mesh.c b/mesh.c
index d6edf3f..f663363 100644
--- a/mesh.c
+++ b/mesh.c
@@ -192,9 +192,10 @@ static const struct mesh_param_descr* find_mesh_param(int argc, char **argv,
/* Find out what mesh parameter we want to change. */
mdescr = NULL;
- for (i = 0; ARRAY_SIZE(_mesh_param_descrs); i++)
+ for (i = 0; i < ARRAY_SIZE(_mesh_param_descrs); i++) {
if (!strcmp(_mesh_param_descrs[i].name, argv[0]))
return _mesh_param_descrs + i;
+ }
if (!mdescr) {
printf("Mesh_param must be one of: ");
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iw: Fix regression in mesh_param input parsing
2009-01-10 1:13 [PATCH] iw: Fix regression in mesh_param input parsing Colin McCabe
@ 2009-01-10 9:14 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-01-10 9:14 UTC (permalink / raw)
To: Colin McCabe; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
On Fri, 2009-01-09 at 17:13 -0800, Colin McCabe wrote:
> In the iw tool, don't crash on bad arguments to "iw dev mesh set mesh_param"
>
> ---
> mesh.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/mesh.c b/mesh.c
> index d6edf3f..f663363 100644
> --- a/mesh.c
> +++ b/mesh.c
> @@ -192,9 +192,10 @@ static const struct mesh_param_descr* find_mesh_param(int argc, char **argv,
>
> /* Find out what mesh parameter we want to change. */
> mdescr = NULL;
> - for (i = 0; ARRAY_SIZE(_mesh_param_descrs); i++)
> + for (i = 0; i < ARRAY_SIZE(_mesh_param_descrs); i++) {
> if (!strcmp(_mesh_param_descrs[i].name, argv[0]))
> return _mesh_param_descrs + i;
> + }
Ouch, sorry about that! Merged the patch, thanks.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-10 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10 1:13 [PATCH] iw: Fix regression in mesh_param input parsing Colin McCabe
2009-01-10 9:14 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.