diff --git a/srcpkgs/reaver/patches/fix-libwps_elements_iterator.patch b/srcpkgs/reaver/patches/fix-libwps_elements_iterator.patch new file mode 100644 index 00000000000..7f0216e6861 --- /dev/null +++ b/srcpkgs/reaver/patches/fix-libwps_elements_iterator.patch @@ -0,0 +1,13 @@ +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; ibuf, (u32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + os_memcpy(digest, ctx->buf, 16); +- os_memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ++ os_memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + } + + /* The four core functions - F1 is optimized somewhat */ diff --git a/srcpkgs/reaver/template b/srcpkgs/reaver/template index 57c656ce67f..4e11805b774 100644 --- a/srcpkgs/reaver/template +++ b/srcpkgs/reaver/template @@ -1,7 +1,7 @@ # Template file for 'reaver' pkgname=reaver version=1.4 -revision=1 +revision=2 build_style=gnu-configure build_wrksrc="src" conf_files="/etc/reaver/reaver.db" @@ -15,8 +15,7 @@ checksum="add3050a4a05fe0ab6bfb291ee2de8e9b8a85f1e64ced93ee27a75744954b22d" post_extract() { case "$XBPS_TARGET_MACHINE" in - *-musl) - find -type f -exec sed -i "{}" -e"s;u_char;unsigned char;g" \; + *-musl) find -type f -exec sed -i "{}" -e"s;u_char;unsigned char;g" \; ;; esac }