From ac01ec903191458a322e4782780974bbf6006ea8 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Tue, 2 Jul 2013 11:55:54 +0300 Subject: Fix ioctl parameters lookups. References #18 Signed-off-by: Roman Yeryomin --- .../patches-2.6.30/8192cd-fix-private-ioctls.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 target/linux/realtek/patches-2.6.30/8192cd-fix-private-ioctls.patch diff --git a/target/linux/realtek/patches-2.6.30/8192cd-fix-private-ioctls.patch b/target/linux/realtek/patches-2.6.30/8192cd-fix-private-ioctls.patch new file mode 100644 index 000000000..0f140fb43 --- /dev/null +++ b/target/linux/realtek/patches-2.6.30/8192cd-fix-private-ioctls.patch @@ -0,0 +1,37 @@ +--- linux-2.6.30.9/drivers/net/wireless/rtl8192cd/8192cd_ioctl.c 2013-06-29 15:37:41.982461999 +0300 ++++ linux-2.6.30.9/drivers/net/wireless/rtl8192cd/8192cd_ioctl.c 2013-07-01 17:53:46.747055454 +0300 +@@ -1537,19 +1537,26 @@ + + static struct iwpriv_arg *get_tbl_entry(char *pstr) + { +- int i=0; ++ if ( !pstr ) ++ return NULL; ++ ++ int i = 0; + int arg_num = sizeof(mib_table)/sizeof(struct iwpriv_arg); +- char name[128]; ++ char name[sizeof(mib_table[i].name)]; ++ memset( name, 0, sizeof name ); + +- while (*pstr && *pstr != '=') +- name[i++] = *pstr++; +- name[i] = '\0'; ++ for ( *pstr; i < sizeof(name); *pstr++ ) { ++ if ( *pstr == '=') ++ break; ++ name[i] = *pstr; ++ i++; ++ } + +- for (i=0; i