Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ipf/dist/tools From Darren Reed: #548 ipfstat h...
details: https://anonhg.NetBSD.org/src/rev/6a9c36b92979
branches: trunk
changeset: 329989:6a9c36b92979
user: christos <christos%NetBSD.org@localhost>
date: Mon Jun 16 12:37:58 2014 +0000
description:
>From Darren Reed: #548 ipfstat hits a bus error on netbsd/sparc64
diffstat:
external/bsd/ipf/dist/tools/ipfstat.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r 2e8d98aac88a -r 6a9c36b92979 external/bsd/ipf/dist/tools/ipfstat.c
--- a/external/bsd/ipf/dist/tools/ipfstat.c Mon Jun 16 12:36:41 2014 +0000
+++ b/external/bsd/ipf/dist/tools/ipfstat.c Mon Jun 16 12:37:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipfstat.c,v 1.4 2014/06/12 17:23:06 christos Exp $ */
+/* $NetBSD: ipfstat.c,v 1.5 2014/06/16 12:37:58 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -856,8 +856,13 @@
if (fp->fr_family != 0 && fp->fr_family != AF_INET)
continue;
}
- if (fp->fr_data != NULL)
- fp->fr_data = (char *)fp + fp->fr_size;
+ if (fp->fr_data != NULL) {
+ fp->fr_data = calloc(1, fp->fr_dsize);
+ if (fp->fr_data != NULL) {
+ memcpy(fp->fr_data, (char *)fp + fp->fr_size,
+ fp->fr_dsize);
+ }
+ }
rules++;
Home |
Main Index |
Thread Index |
Old Index