Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/sys/net/frag Don't overrun the buffer, when writing ...
details: https://anonhg.NetBSD.org/src/rev/f93bb06449d2
branches: trunk
changeset: 757920:f93bb06449d2
user: rmind <rmind%NetBSD.org@localhost>
date: Sun Oct 03 19:41:25 2010 +0000
description:
Don't overrun the buffer, when writing some payload.
diffstat:
regress/sys/net/frag/ip4_frag_1.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 24f93fcf913e -r f93bb06449d2 regress/sys/net/frag/ip4_frag_1.c
--- a/regress/sys/net/frag/ip4_frag_1.c Sun Oct 03 19:36:38 2010 +0000
+++ b/regress/sys/net/frag/ip4_frag_1.c Sun Oct 03 19:41:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip4_frag_1.c,v 1.1 2010/07/13 22:13:18 rmind Exp $ */
+/* $NetBSD: ip4_frag_1.c,v 1.2 2010/10/03 19:41:25 rmind Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -126,7 +126,8 @@
n = 0;
}
for (data += n; n < addlen; n++) {
- data[n] = (0xf & n);
+ *data = (0xf & n);
+ data++;
}
return (void *)ip;
}
Home |
Main Index |
Thread Index |
Old Index