Modify

Opened 3 years ago

Closed 3 years ago

Last modified 6 months ago

#762 closed defect (fixed)

compiling aircrack-ng with gcc 4.5 prints warning "array subscript is below array bounds"

Reported by: jensp Owned by:
Priority: minor Milestone: 1.2
Component: general Version: 1.1
Keywords: Cc:

Description

When compiling aircrack-ng 1.1 (same problem with current svn r1740) with GCC 4.5 the following warning occurs:

x86_64-pc-linux-gnu-gcc-4.5.0 -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -Iinclude   -c -o aircrack-ng.o aircrack-ng.c
cc1: warnings being treated as errors
aircrack-ng.c: In function ‘do_wpa_crack’:
aircrack-ng.c:4189:8: error: array subscript is below array bounds
make[1]: *** [aircrack-ng.o] Error 1

Downgrading GCC to 4.4 or removing -Werror from the CFLAGS works around the problem.

Attachments (0)

Change History (11)

comment:1 Changed 3 years ago by misterx

  • Milestone changed from 1.3 to 1.2

comment:2 Changed 3 years ago by JP <jackpat@…>

I have a same problem with the sources from oficial site (aircrack-ng-1.1.tar.gz).
Distro is openSUSE 11.3 (x64).

make -C src all
make[1]: Entering directory `/home/jp/Downloads/aircrack-ng-1.1/src'
make -C osdep
make[2]: Entering directory `/home/jp/Downloads/aircrack-ng-1.1/src/osdep'
Building for Linux
make[3]: Entering directory `/home/jp/Downloads/aircrack-ng-1.1/src/osdep'
make[3]: `.os.Linux' does not need in update.
make[3]: Leaving directory `/home/jp/Downloads/aircrack-ng-1.1/src/osdep'
make[2]: Leaving directory `/home/jp/Downloads/aircrack-ng-1.1/src/osdep'
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -Iinclude   -c -o aircrack-ng.o aircrack-ng.c
cc1: warnings being treated as errors
aircrack-ng.c: In function ‘do_wpa_crack’:
aircrack-ng.c:4189:8: error: array subscript is below array bounds
make[1]: *** [aircrack-ng.o] Error 1
make[1]: Leaving directory `/home/jp/Downloads/aircrack-ng-1.1/src'
make: *** [all] Error 2

comment:3 Changed 3 years ago by jadcitomen@…

yo tambien tengo el mismo problema en ubuntu 8.04 y 9.04 de escritorio, e instalado las dependencias que requiere pero el error persiste.

comment:4 Changed 3 years ago by anonymous

Please help, i have the same poblem on openSuSE 11.3 - what i need to do?

make -C src all
make[1]: Entering directory `/home/deamon/Downloads/aircrack-ng-1.1/src'
make -C osdep
make[2]: Entering directory `/home/deamon/Downloads/aircrack-ng-1.1/src/osdep'
Building for Linux
make[3]: Entering directory `/home/deamon/Downloads/aircrack-ng-1.1/src/osdep'
make[3]: `.os.Linux' не требует обновления.
make[3]: Leaving directory `/home/deamon/Downloads/aircrack-ng-1.1/src/osdep'
make[2]: Leaving directory `/home/deamon/Downloads/aircrack-ng-1.1/src/osdep'
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -Iinclude   -c -o aircrack-ng.o aircrack-ng.c
cc1: warnings being treated as errors
aircrack-ng.c: В функции ‘do_wpa_crack’:
aircrack-ng.c:4189:8: ошибка: array subscript is below array bounds
make[1]: *** [aircrack-ng.o] Ошибка 1
make[1]: Leaving directory `/home/deamon/Downloads/aircrack-ng-1.1/src'
make: *** [all] Ошибка 2


comment:5 Changed 3 years ago by anonymous

I also get this error but following the solution of OP, I edited common.mak and removed the -Werror flag. Ugly but it works.

comment:6 Changed 3 years ago by misterx

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed by r1789.

comment:7 follow-up: Changed 2 years ago by anonymous

I had the same problem and also solved it by editing common.mak and removing the line with the -Werror flag.

comment:8 Changed 2 years ago by misterx

Did you try the svn version?

comment:9 Changed 2 years ago by raj.surya19@…

@anonymous

Thanks dude! it works

comment:10 in reply to: ↑ 7 Changed 20 months ago by anonymous

Replying to anonymous:

I had the same problem and also solved it by editing common.mak and removing the line with the -Werror flag.

Yeah.Its Work in My Ubuntu 11.04

comment:11 Changed 20 months ago by anonymous

Same problem and same solution.. :) remove the -Werror flag

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.