Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ntp/dist/ntpd fix a potential off-by-two array ...
details: https://anonhg.NetBSD.org/src/rev/77f588edd0f2
branches: trunk
changeset: 766414:77f588edd0f2
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Jun 22 03:59:49 2011 +0000
description:
fix a potential off-by-two array overflow found by GCC 4.5.3.
diffstat:
external/bsd/ntp/dist/ntpd/refclock_parse.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r ffae32d06e78 -r 77f588edd0f2 external/bsd/ntp/dist/ntpd/refclock_parse.c
--- a/external/bsd/ntp/dist/ntpd/refclock_parse.c Wed Jun 22 03:58:51 2011 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_parse.c Wed Jun 22 03:59:49 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refclock_parse.c,v 1.3 2010/12/04 23:08:35 christos Exp $ */
+/* $NetBSD: refclock_parse.c,v 1.4 2011/06/22 03:59:49 mrg Exp $ */
/*
* /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.81 2009/05/01 10:15:29 kardel RELEASE_20090105_A
@@ -2455,7 +2455,7 @@
{
if (buffer[0])
strncat(buffer, "; ", size);
- strncat(buffer, flagstrings[i].name, size);
+ strncat(buffer, flagstrings[i].name, size - 2);
}
i++;
}
Home |
Main Index |
Thread Index |
Old Index