summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-05-23 15:26:36 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-05-23 15:26:36 +0000
commit8e469a4a54fe66f274e388107f28beb7b3250a8c (patch)
treec113ec277aa0a3e07ae0135d1efcad4ecac4b87d /usr.sbin
parent960bc87e871407634126b732df71d8d828314a71 (diff)
Fix logging of wildcard label mappings.
If snprintf fails, a value less than 0 is returned.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldpd/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/log.c b/usr.sbin/ldpd/log.c
index ee380cb47f9..bca642bd070 100644
--- a/usr.sbin/ldpd/log.c
+++ b/usr.sbin/ldpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.16 2016/05/23 15:14:07 renato Exp $ */
+/* $OpenBSD: log.c,v 1.17 2016/05/23 15:26:35 renato Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -323,7 +323,7 @@ log_map(struct map *map)
switch (map->type) {
case FEC_WILDCARD:
- if (snprintf(buf, sizeof(buf), "wildcard"))
+ if (snprintf(buf, sizeof(buf), "wildcard") < 0)
return ("???");
break;
case FEC_PREFIX: