aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-07-06 13:23:00 +0800
committermarcus <marcus@FreeBSD.org>2004-07-06 13:23:00 +0800
commitd0d0675efa9d3c09e3ef9889b50cc5cc994e47e5 (patch)
treeb2cce3ce1509e4c715f841f13c2c99e23584c170 /net
parentcaffacde2da44b366decba855fa190c54340e11b (diff)
downloadfreebsd-ports-graphics-d0d0675efa9d3c09e3ef9889b50cc5cc994e47e5.tar.gz
freebsd-ports-graphics-d0d0675efa9d3c09e3ef9889b50cc5cc994e47e5.tar.zst
freebsd-ports-graphics-d0d0675efa9d3c09e3ef9889b50cc5cc994e47e5.zip
Be a little more sensible when allocating memory to hold the netstat tokens.
Diffstat (limited to 'net')
-rw-r--r--net/gnome-nettool/Makefile1
-rw-r--r--net/gnome-nettool/files/patch-src_info.c4
-rw-r--r--net/gnomenettool/Makefile1
-rw-r--r--net/gnomenettool/files/patch-src_info.c4
4 files changed, 6 insertions, 4 deletions
diff --git a/net/gnome-nettool/Makefile b/net/gnome-nettool/Makefile
index 5d49f0c0725..88dfb07f5e0 100644
--- a/net/gnome-nettool/Makefile
+++ b/net/gnome-nettool/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gnomenettool
PORTVERSION= 0.99.1
+PORTREVISION= 1
CATEGORIES= net gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-nettool/0.99
diff --git a/net/gnome-nettool/files/patch-src_info.c b/net/gnome-nettool/files/patch-src_info.c
index 7b6e43a5fcf..d5602ae5be8 100644
--- a/net/gnome-nettool/files/patch-src_info.c
+++ b/net/gnome-nettool/files/patch-src_info.c
@@ -1,5 +1,5 @@
--- src/info.c.orig Fri Jun 11 07:14:17 2004
-+++ src/info.c Mon Jul 5 15:25:09 2004
++++ src/info.c Tue Jul 6 01:19:20 2004
@@ -37,6 +37,9 @@
#include <sys/ioctl.h>
#include <stdlib.h>
@@ -132,7 +132,7 @@
compressed, multicast,
tx_bytes, tx_pkt, tx_error, tx_drop, tx_fifo, collissions);
+#elif defined(__FreeBSD__)
-+ tokens = (gchar **) g_malloc0 ((sizeof (char)) * (strlen (line) + 2));
++ tokens = (gchar **) g_malloc0 (sizeof (gchar *) * 12);
+ p = strtok (line, " \t\n");
+ /* We only care about 11 fields for now */
+ for (i = 0; i < 11 && p; i++, p = strtok (NULL, " \t\n")) {
diff --git a/net/gnomenettool/Makefile b/net/gnomenettool/Makefile
index 5d49f0c0725..88dfb07f5e0 100644
--- a/net/gnomenettool/Makefile
+++ b/net/gnomenettool/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gnomenettool
PORTVERSION= 0.99.1
+PORTREVISION= 1
CATEGORIES= net gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-nettool/0.99
diff --git a/net/gnomenettool/files/patch-src_info.c b/net/gnomenettool/files/patch-src_info.c
index 7b6e43a5fcf..d5602ae5be8 100644
--- a/net/gnomenettool/files/patch-src_info.c
+++ b/net/gnomenettool/files/patch-src_info.c
@@ -1,5 +1,5 @@
--- src/info.c.orig Fri Jun 11 07:14:17 2004
-+++ src/info.c Mon Jul 5 15:25:09 2004
++++ src/info.c Tue Jul 6 01:19:20 2004
@@ -37,6 +37,9 @@
#include <sys/ioctl.h>
#include <stdlib.h>
@@ -132,7 +132,7 @@
compressed, multicast,
tx_bytes, tx_pkt, tx_error, tx_drop, tx_fifo, collissions);
+#elif defined(__FreeBSD__)
-+ tokens = (gchar **) g_malloc0 ((sizeof (char)) * (strlen (line) + 2));
++ tokens = (gchar **) g_malloc0 (sizeof (gchar *) * 12);
+ p = strtok (line, " \t\n");
+ /* We only care about 11 fields for now */
+ for (i = 0; i < 11 && p; i++, p = strtok (NULL, " \t\n")) {