diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 15:26:36 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 15:26:36 +0000 |
commit | 8e469a4a54fe66f274e388107f28beb7b3250a8c (patch) | |
tree | c113ec277aa0a3e07ae0135d1efcad4ecac4b87d /usr.sbin | |
parent | 960bc87e871407634126b732df71d8d828314a71 (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.c | 4 |
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: |