Merge branch 'master' of https://github.com/mrash/fwknop
This commit is contained in:
commit
f7f52cf18c
15
configure.ac
15
configure.ac
@ -189,7 +189,7 @@ if test "x$want_asan_support" = "xyes"; then
|
||||
FKO_CHECK_COMPILER_ARG([-fsanitize=address -fno-omit-frame-pointer])
|
||||
fi
|
||||
|
||||
dnl Decide whether or not to enable MemorySanitizer support
|
||||
dnl Decide whether or not to enable UndefineSanitizer support
|
||||
dnl
|
||||
want_ubsan_support=no
|
||||
AC_ARG_ENABLE([ubsan-support],
|
||||
@ -202,6 +202,19 @@ if test "x$want_ubsan_support" = "xyes"; then
|
||||
FKO_CHECK_COMPILER_ARG([-fsanitize=undefined])
|
||||
fi
|
||||
|
||||
dnl Decide whether or not to enable MemorySanitizer support
|
||||
dnl
|
||||
want_memsan_support=no
|
||||
AC_ARG_ENABLE([memsan-support],
|
||||
[AS_HELP_STRING([--enable-memsan-support],
|
||||
[Build fwknop binaries with MemorySanitizer support @<:@default is to disable@:>@])],
|
||||
[want_memsan_support=$enableval],
|
||||
[])
|
||||
|
||||
if test "x$want_memsan_support" = "xyes"; then
|
||||
FKO_CHECK_COMPILER_ARG([-fsanitize=memory -fsanitize-memory-track-origins=2])
|
||||
fi
|
||||
|
||||
dnl Decide whether or not force 32-bit mode
|
||||
dnl
|
||||
want_32bit_mode=no
|
||||
|
||||
@ -220,7 +220,9 @@ process_packet(PROCESS_PKT_ARGS_TYPE *args, PACKET_HEADER_META,
|
||||
|
||||
/* Copy the packet for SPA processing
|
||||
*/
|
||||
strlcpy((char *)opts->spa_pkt.packet_data, (char *)pkt_data, pkt_data_len+1);
|
||||
memcpy((char *)opts->spa_pkt.packet_data, (char *)pkt_data, pkt_data_len);
|
||||
opts->spa_pkt.packet_data[pkt_data_len] = '\0';
|
||||
|
||||
opts->spa_pkt.packet_data_len = pkt_data_len;
|
||||
opts->spa_pkt.packet_proto = proto;
|
||||
opts->spa_pkt.packet_src_ip = src_ip;
|
||||
|
||||
@ -214,7 +214,6 @@ is_digits(const char * const str)
|
||||
{
|
||||
if(!isdigit((int)(unsigned char)str[i]))
|
||||
return 0;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user