mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Fixes build failures, a CVE, and some other bugs. Closes: https://trac.macports.org/ticket/63767
97 lines
2.5 KiB
Diff
97 lines
2.5 KiB
Diff
Description: Avoid implicitly converted pointers
|
|
Implicitly converted pointers will cause segfault on architectures where
|
|
the size of a pointer is greater than the size of an integer, such as
|
|
ia64.
|
|
Author: dann frazier <dannf@dannf.org>
|
|
Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=326927#5
|
|
Bug-Debian: http://bugs.debian.org/326927
|
|
Last-Update: 2005-09-06
|
|
|
|
--- /dev/null
|
|
+++ b/src/datalink.h
|
|
@@ -0,0 +1,29 @@
|
|
+/*
|
|
+ * datalink.h -- calculates datalink offsets
|
|
+ * Part of the tcpick project
|
|
+ *
|
|
+ * Author: Francesco Stablum <duskdruid @ despammed.com>
|
|
+ *
|
|
+ * Copyright (C) 2003, 2004 Francesco Stablum
|
|
+ * Licensed under the GPL
|
|
+ *
|
|
+ */
|
|
+
|
|
+/*
|
|
+ * This program is free software; you can redistribute it and/or
|
|
+ * modify it under the terms of the GNU General Public License as
|
|
+ * published by the Free Software Foundation; either version 2 of the
|
|
+ * License, or (at you option) any later version.
|
|
+ *
|
|
+ * This program is distributed in the hope that it will be useful, but
|
|
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
+ * See the GNU General Public License for more details.
|
|
+ *
|
|
+ * You should have received a copy of the GNU General Public License
|
|
+ * along with this program; if not, write to the Free Software
|
|
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
|
|
+ * USA.
|
|
+ */
|
|
+
|
|
+char *datalink2str(int dl_id);
|
|
--- a/src/display.c
|
|
+++ b/src/display.c
|
|
@@ -28,6 +28,7 @@
|
|
/* FIXME: most code is duplicated: find a better solution! */
|
|
|
|
#include "tcpick.h"
|
|
+#include "lookup.h"
|
|
#include "extern.h"
|
|
|
|
char *
|
|
--- a/src/lookup.h
|
|
+++ b/src/lookup.h
|
|
@@ -26,6 +26,8 @@
|
|
* USA.
|
|
*/
|
|
|
|
+#ifndef _LOOKUP_H
|
|
+#define _LOOKUP_H
|
|
|
|
struct _l_node /* the node/leaf of the tree */
|
|
{
|
|
@@ -40,3 +42,9 @@ struct _l_node /* the node/leaf of the t
|
|
char * name;
|
|
struct in_addr ip;
|
|
};
|
|
+
|
|
+char *lookup(struct in_addr ia);
|
|
+struct _l_node *_l_alloc(struct in_addr, char *);
|
|
+char *_l_get(struct in_addr);
|
|
+
|
|
+#endif
|
|
--- a/src/tcpick.c
|
|
+++ b/src/tcpick.c
|
|
@@ -49,6 +49,7 @@
|
|
|
|
#include "tcpick.h"
|
|
#include "globals.h"
|
|
+#include "datalink.h"
|
|
|
|
char *errbuf[PCAP_ERRBUF_SIZE];
|
|
struct bpf_program filter_compiled;
|
|
--- a/src/write.c
|
|
+++ b/src/write.c
|
|
@@ -25,8 +25,11 @@
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#define _GNU_SOURCE
|
|
+#include <string.h>
|
|
#include "tcpick.h"
|
|
#include "extern.h"
|
|
+#include "lookup.h"
|
|
|
|
__inline__ char *
|
|
avail_filename(struct CONN * conn_ptr,
|