Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ldpd PR/45662: Henning Petersen: Overlapping buffer...



details:   https://anonhg.NetBSD.org/src/rev/fed90379e5f9
branches:  trunk
changeset: 772223:fed90379e5f9
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 24 23:51:27 2011 +0000

description:
PR/45662: Henning Petersen: Overlapping buffer in lpd_command.c

diffstat:

 usr.sbin/ldpd/ldp_command.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (23 lines):

diff -r 7de15142cf9a -r fed90379e5f9 usr.sbin/ldpd/ldp_command.c
--- a/usr.sbin/ldpd/ldp_command.c       Sat Dec 24 23:48:17 2011 +0000
+++ b/usr.sbin/ldpd/ldp_command.c       Sat Dec 24 23:51:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_command.c,v 1.5 2011/06/16 08:27:28 kefren Exp $ */
+/* $NetBSD: ldp_command.c,v 1.6 2011/12/24 23:51:27 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -486,10 +486,9 @@
                if (p->state != LDP_PEER_ESTABLISHED)
                        continue;
                SLIST_FOREACH(lm, &p->label_mapping_head, mappings) {
-                       snprintf(sendspace, MAXSEND, "%s:%d",
-                           inet_ntoa(p->ldp_id), lm->label);
-                       snprintf(sendspace, MAXSEND, "%s\t%s/%d\n",
-                           sendspace, inet_ntoa(lm->address), lm->prefix);
+                       snprintf(sendspace, MAXSEND, "%s:%d\t%s/%d\n",
+                           inet_ntoa(p->ldp_id), lm->label,
+                           inet_ntoa(lm->address), lm->prefix);
                        writestr(s, sendspace);
                }
        }



Home | Main Index | Thread Index | Old Index