Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 21 Mar 2013 10:54:50 -0500
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: RE: Building unstable jumbo failed

Here is a patch that works around these warnings for wpapcap2john.

NOTE, I have not tested yet. I do not have any pcap files that contain
handshakes where I am at right now.  I will validate this works properly
when I return home. However, it should be fine.

I had to add a union around the bit array.
I then included johnswap, and for the 32 and 64 bit swaps, I simply use the
john swap macros.
There was one small variable change I had to make to the c code, due to
including the johnswap.h (itoa64 variable clashed).

This 'should' work with no side effects, but like I said, it has not been
run on real data (in prior form, and in this patched form).  I will test
later today.  Also, I am not 100% sure the changes I made will remove the
warnings.  The warnings are 100% spurious, and my cygwin compiler does not
complain using the original code, so I have nothing to compare to.  I did
add -Wstrict-aliasing to CFLAGS, and to the build line of wpacpap2john.  My
compiler was not concerned with the original code, but I can see exactly
what it was complaining about.

Magnum, at least test to see if this patches properly, and elims the
warnings.  If you happen to have a pcap file or 2 that is a valid WPA
handshake, then you can see if this code works, (i.e. same output as the
prior build, before this patch).

Jim.

>-----Original Message-----
>From: magnum [mailto:john.magnum@...hmail.com] 
>
>I tried this. Unstable is less stable for a few days. Now all xx2john tools
are built by deafult, provided you have pcap and c++. Enabling more warnings
>made these pop up now:
>
>uaf2john.c: In function 'uaf_extract_from_raw':
>uaf2john.c:173:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
>wpapcap2john.h: In function 'swap64u':
>wpapcap2john.h:125:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
>wpapcap2john.h:129:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
>wpapcap2john.c: In function 'Handle4Way':
>wpapcap2john.c:182:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
>wpapcap2john.c:182:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]

Download attachment "wpapcap2john_warning_removal-bleeding.patch" of type "application/octet-stream" (3910 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.