aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nDPId-test.c2
-rw-r--r--nDPIsrvd.c2
-rw-r--r--sonar-project.properites1
3 files changed, 3 insertions, 2 deletions
diff --git a/nDPId-test.c b/nDPId-test.c
index f5c6a7ed7..88338e3d2 100644
--- a/nDPId-test.c
+++ b/nDPId-test.c
@@ -119,7 +119,7 @@ struct distributor_global_user_data
{
int do_hash_checks;
} options;
-};
+} __attribute__((__packed__));
struct distributor_flow_user_data
{
diff --git a/nDPIsrvd.c b/nDPIsrvd.c
index cb4c08a45..dd539fd73 100644
--- a/nDPIsrvd.c
+++ b/nDPIsrvd.c
@@ -1062,7 +1062,7 @@ static int new_connection(struct nio * const io, int eventfd)
pwsiz = BUFSIZ;
}
char buf[pwsiz];
- if (getpwuid_r(ucred.uid, &pwnam, &buf[0], pwsiz, &pwres) != 0)
+ if (getpwuid_r(ucred.uid, &pwnam, &buf[0], pwsiz, &pwres) != 0 || pwres == NULL)
{
logger(1, "Could not get passwd entry for user id %u", ucred.uid);
return 1;
diff --git a/sonar-project.properites b/sonar-project.properites
index 82a067f67..9fe117943 100644
--- a/sonar-project.properites
+++ b/sonar-project.properites
@@ -6,3 +6,4 @@ sonar.projectVersion=1.5
sonar.sourceEncoding=UTF-8
sonar.sources=*.c,*.h,dependencies/nDPIsrvd.h,dependencies/nDPIsrvd.py,examples/c-*/**,examples/cxx-*/**,examples/py-*/**
+sonar.exclusions = dependencies/jsmn/** dependencies/uthash/** examples/js-rt-analyzer-frontend/** examples/js-rt-analyzer/** examples/c-collectd/www/** examples/py-flow-dashboard/assets/**