aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2019-02-22 21:46:02 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2019-02-23 19:40:38 +0100
commit54ef49d46844f60ce4e265f2b0be7927383e06df (patch)
tree10fa6488b2533d1282f21d5ee6212b7786dc8aef
parentc1ad352d26de110c4784dadca428d4b740324ecf (diff)
downloadbuildroot-54ef49d46844f60ce4e265f2b0be7927383e06df.tar.gz
buildroot-54ef49d46844f60ce4e265f2b0be7927383e06df.tar.bz2
package/reaver: fix build on m68k
Fixes: - http://autobuild.buildroot.org/results/935c038b921ffa0f185571de41223e4c201e964b Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 26d072978982137c9f09abe3c7bfbfd2a13efc64) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/reaver/0001-fix-271.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/reaver/0001-fix-271.patch b/package/reaver/0001-fix-271.patch
new file mode 100644
index 0000000000..9f6b395120
--- /dev/null
+++ b/package/reaver/0001-fix-271.patch
@@ -0,0 +1,32 @@
+From c7040da3a9ff98cd8063b9d5b5a7721374186391 Mon Sep 17 00:00:00 2001
+From: rofl0r <retnyg@gmx.net>
+Date: Fri, 22 Feb 2019 17:38:24 +0000
+Subject: [PATCH] fix #271
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/t6x/reaver-wps-fork-t6x/commit/c7040da3a9ff98cd8063b9d5b5a7721374186391]
+---
+ src/wps/wps_attr_parse.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c
+index 30b0e79..d681b70 100644
+--- a/src/wps/wps_attr_parse.c
++++ b/src/wps/wps_attr_parse.c
+@@ -443,12 +443,12 @@ int wps_parse_msg(const struct wpabuf *msg, struct wps_parse_attr *attr)
+ * Mac OS X 10.6 seems to be adding 0x00 padding to the
+ * end of M1. Skip those to avoid interop issues.
+ */
+- int i;
+- for (i = 0; i < end - pos; i++) {
++ uintptr_t i, left = end - pos;
++ for (i = 0; i < left; i++) {
+ if (pos[i])
+ break;
+ }
+- if (i == end - pos) {
++ if (i == left) {
+ wpa_printf(MSG_DEBUG, "WPS: Workaround - skip "
+ "unexpected message padding");
+ break;