Skip to content

Commit

Permalink
More reliable buffer overflow in make check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marshall Lee Whittaker committed Oct 9, 2017
1 parent 887181c commit 2ae8b1f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 999 deletions.
15 changes: 8 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
#SUBDIRS = tests
if WITH_GTK
bin_PROGRAMS = ansvif find_suid buffer_overflow string_format ansvif_gtk
bin_PROGRAMS = ansvif find_suid generic_buffer_overflow string_format ansvif_gtk
endif
if WITH_SYSCALLS
bin_PROGRAMS = ansvif find_suid buffer_overflow string_format syscalls
bin_PROGRAMS = ansvif find_suid generic_buffer_overflow string_format syscalls
else
bin_PROGRAMS = ansvif find_suid buffer_overflow string_format
bin_PROGRAMS = ansvif find_suid generic_buffer_overflow string_format
endif
noinst_LIBRARIES = libgzstream.a
libgzstream_a_SOURCES = include/gzstream/gzstream.h include/gzstream/gzstream.C
Expand All @@ -32,10 +32,11 @@ ansvif_LDFLAGS = -I./include/gzstream -I./include/xml_writer -I./src/linux -pthr
ansvif_CPPFLAGS = -O3 -D __DEBIAN -Wl,--no-as-needed -std=c++11
endif
find_suid_SOURCES = src/linux/find_suid.cpp
buffer_overflow_SOURCES = src/buffer_overflow.c
buffer_overflow_CFLAGS = -ansi -fno-stack-protector -D_GNU_SOURCE -Wno-implicit-function-declarationw
#buffer_overflow_SOURCES = src/buffer_overflow.c
#buffer_overflow_CFLAGS = -ansi -fno-stack-protector -D_GNU_SOURCE -Wno-implicit-function-declarationw
string_format_SOURCES = src/string_format.c
string_format_CFLAGS = -ansi -D_GNU_SOURCE -Wno-format-security
generic_buffer_overflow_SOURCES = src/generic_buffer_overflow.c
if WITH_SYSCALLS
syscalls_SOURCES = src/linux/syscalls.cpp
syscalls_CPPFLAGS = -ansi -Wno-unused-result -Wno-nonnull -std=c++11
Expand All @@ -47,9 +48,9 @@ ansvif_gtk_CPPFLAGS = @GTK_CFLAGS@ -fpermissive
endif
ansvifdir = bin
check: all
./ansvif -t examples/space.txt -c ./buffer_overflow -b 32 -o checkfaulty && rm checkfaulty.*
./ansvif -t examples/space.txt -c ./generic_buffer_overflow -b 32 -o checkfaulty && rm checkfaulty.*
@echo "*** CHECK 1 PASSED ***"
./ansvif -t examples/space.txt -c ./buffer_overflow -b 32
./ansvif -t examples/space.txt -c ./generic_buffer_overflow -b 32
@echo "*** CHECK 2 PASSED ***"
./ansvif -t examples/space.txt -c ./string_format -b 32
@echo "*** CHECK 3 PASSED ***"
Expand Down
Loading

0 comments on commit 2ae8b1f

Please sign in to comment.