From 0ea1d58671dec77a66b642cec9145cb293efcfed Mon Sep 17 00:00:00 2001 From: Samuele Musiani Date: Tue, 24 Dec 2024 19:25:22 +0100 Subject: [PATCH 1/2] fix: avoid segfault on invalid args --- src/unixcmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unixcmd.c b/src/unixcmd.c index 83424d80..1c123699 100644 --- a/src/unixcmd.c +++ b/src/unixcmd.c @@ -56,6 +56,7 @@ int main(int argc,char *argv[]) {"rcfile", 1, 0, 'f'}, {"sock", 1, 0, 's'}, {"verbose", 0, 0, 'v'}, + { 0, 0, 0, 0}, }; int c; while ((c=getopt_long (argc, argv, "f:s:v", From 48bf8beca97e49f07570ed4e733ef017853f12e9 Mon Sep 17 00:00:00 2001 From: Samuele Musiani Date: Tue, 24 Dec 2024 20:02:49 +0100 Subject: [PATCH 2/2] fix: SYSCONFDIR and LOCALSTATEDIR path from CMake --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 763cafc1..b0161bc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(vde2 include(GNUInstallDirs) include(./Macros.cmake) -add_definitions(-DSYSCONFDIR=\"${CMAKE_INSTALL_SYSCONFDIR}\" -DLOCALSTATEDIR=\"${CMAKE_INSTALL_LOCALSTATEDIR}\") +add_definitions(-DSYSCONFDIR=\"/${CMAKE_INSTALL_SYSCONFDIR}\" -DLOCALSTATEDIR=\"/${CMAKE_INSTALL_LOCALSTATEDIR}\") cm_define_project( ${PROJECT_VERSION}