jer         14/10/07 18:58:15

  Added:                reaver-1.4_memset.patch
                        reaver-1.4_wps_registrar.patch
  Log:
  Fix some compiler warnings.
  
  (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with 
key A792A613)

Revision  Changes    Path
1.1                  net-wireless/reaver/files/reaver-1.4_memset.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/reaver/files/reaver-1.4_memset.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/reaver/files/reaver-1.4_memset.patch?rev=1.1&content-type=text/plain

Index: reaver-1.4_memset.patch
===================================================================
--- a/src/crypto/md5-internal.c
+++ b/src/crypto/md5-internal.c
@@ -188,7 +188,7 @@
     MD5Transform(ctx->buf, (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 */



1.1                  net-wireless/reaver/files/reaver-1.4_wps_registrar.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/reaver/files/reaver-1.4_wps_registrar.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/reaver/files/reaver-1.4_wps_registrar.patch?rev=1.1&content-type=text/plain

Index: reaver-1.4_wps_registrar.patch
===================================================================
--- a/wps/wps_registrar.c
+++ b/wps/wps_registrar.c
@@ -2317,11 +2317,11 @@
        /* @@@ Save a copy of the network key and ssid directly to the wps_data 
structure @@@ */
        if(wps->cred.key_len > 0)
        {
-               wps->key = strdup(wps->cred.key);
+               memcpy(wps->key, wps->cred.key, sizeof(wps->cred.key));
        }
        if(wps->cred.ssid_len > 0)
        {
-               wps->essid = strdup(wps->cred.ssid);
+               memcpy(wps->essid, wps->cred.ssid, sizeof(wps->cred.ssid));
        }
 
        if (wps->new_ap_settings) {
--- a/wps/wps_registrar.c
+++ b/wps/wps_registrar.c
@@ -1469,7 +1469,7 @@
 
        wpa_printf(MSG_DEBUG, "WPS: Building Message M4");
 
-       wpa_printf(MSG_DEBUG, "WPS: Dev Password Len: %d", 
wps->dev_password_len);
+       wpa_printf(MSG_DEBUG, "WPS: Dev Password Len: %zd", 
wps->dev_password_len);
        wpa_printf(MSG_DEBUG, "WPS: Dev Password: %s", wps->dev_password);
 
        wps_derive_psk(wps, wps->dev_password, wps->dev_password_len);




Reply via email to