void-packages/srcpkgs/reaver/patches/fix-libwps_elements_iterator.patch
Jürgen Buchmüller 63505f358c reaver: fix gcc warnings
+ Fix out of bounds access to elements[] in libwps
+ Fix memset to zap ctx in md5-internal.c
2017-01-09 01:01:17 +01:00

13 lines
457 B
Diff

Fix the calculation of the number of iterations.
--- src/libwps/libwps.c 2012-01-18 10:02:39.000000000 +0100
+++ src/libwps/libwps.c 2017-01-09 00:55:01.593948178 +0100
@@ -83,7 +83,7 @@
if(wps_ie_data)
{
- for(i=0; i<sizeof(elements); i++)
+ for(i=0; i<sizeof(elements)/sizeof(elements[0]); i++)
{
/* Search for each WPS element inside the WPS IE data blob */
el = get_wps_data_element(wps_ie_data, wps_data_len, elements[i], &el_len);