diff --git a/CHANGELOG b/CHANGELOG index ccb9f70..c827543 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,3 +12,8 @@ SUPPORT Issue #1 "Failure at calloc for 'ip_seen' on KVM VPSs?" 1.0.2 2013-8-18 BUGFIX Issue #14 "gcc 4.7.2 -Wunprototyped-calls error with recv_run." - changed recv_run header to match def in recv.c + +1.0.3 2013-8-19 +BUGFIX Issues 21,28 "fixed get_gateway malloc/memset errors" +BUGFIX Issue 24 "Makefile does not respect LDFLAGS" + - changed = to += for CFLAGS, LDFAGS, and LDLIBS diff --git a/src/Makefile b/src/Makefile index eeffc0b..6301977 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,8 +1,6 @@ -CC=gcc - -CFLAGS=-Wall -pedantic -Wextra -std=gnu99 -I../lib -I./ -Ioutput_modules -O2 -g -LDFLAGS=-g -pthread -LDLIBS= -lpcap -lgmp -lm +CFLAGS+=-Wall -pedantic -Wextra -std=gnu99 -I../lib -I./ -Ioutput_modules -O2 -g +LDFLAGS+=-g -pthread +LDLIBS+= -lpcap -lgmp -lm TARGETS=zmap VPATH=../lib:output_modules:probe_modules PREFIX=/usr/local diff --git a/src/get_gateway.c b/src/get_gateway.c index 26f6404..e015fa8 100644 --- a/src/get_gateway.c +++ b/src/get_gateway.c @@ -72,7 +72,7 @@ int send_nl_req(uint16_t msg_type, uint32_t seq, return -1; } - memset(nlmsg, 0, sizeof(nlmsg)); + memset(nlmsg, 0, NLMSG_SPACE(payload_len)); memcpy(NLMSG_DATA(nlmsg), payload, payload_len); nlmsg->nlmsg_type = msg_type; nlmsg->nlmsg_len = NLMSG_LENGTH(payload_len);