summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/command_match.c1
-rw-r--r--lib/sockunion.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 99ec03e0c..4893ead04 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -609,6 +609,7 @@ static struct list *disambiguate(struct list *first, struct list *second,
vector vline, unsigned int n)
{
// doesn't make sense for these to be inequal length
+ assert(first && second);
assert(first->count == second->count);
assert(first->count == vector_active(vline) - n + 1);
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 28a7f647c..44378b536 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -46,6 +46,9 @@ int str2sockunion(const char *str, union sockunion *su)
{
int ret;
+ if (str == NULL)
+ return -1;
+
memset(su, 0, sizeof(union sockunion));
ret = inet_pton(AF_INET, str, &su->sin.sin_addr);