Package: netrek-client-cow
Version: 3.2.9-1
Severity: serious
Tags: patch
Usertags: implicit-pointer-conversion

Our automated buildd log filter[1] detected a problem that is likely to
cause your package to segfault on architectures where the size of a
pointer is greater than the size of an integer, such as ia64 and amd64.

  Function `query_cowid' implicitly converted to pointer at newwin.c:1232
  Function `getaddr2' implicitly converted to pointer at senddist.c:125
  Function `query_cowid' implicitly converted to pointer at docwin.c:82

This is often due to a missing function prototype definition.
For more information, see [2].

Though it is guaranteed that this codepath will cause a segfault on certain
architectures, it is not guaranteed that this codepath would ever be executed
(e.g., if the returned pointer is never dereferenced). However, this bug
does prevent the ia64 buildd from successfully building this package, resulting
in a practical FTBFS issue and warranting the serious severity.

[1] http://people.debian.org/~dannf/check-implicit-pointer-functions
[2] http://wiki.debian.org/ImplicitPointerConversions
diff -urpN netrek-client-cow-3.2.9.orig/docwin.c netrek-client-cow-3.2.9/docwin.c
--- netrek-client-cow-3.2.9.orig/docwin.c	2009-01-05 01:17:39.000000000 -0700
+++ netrek-client-cow-3.2.9/docwin.c	2009-01-20 15:39:55.000000000 -0700
@@ -27,6 +27,7 @@
 #include "data.h"
 #include "packets.h"
 
+extern char *query_cowid(void);
 										/* #ifndef 
 										 * _IBMR2 
 										 * char 
diff -urpN netrek-client-cow-3.2.9.orig/newwin.c netrek-client-cow-3.2.9/newwin.c
--- netrek-client-cow-3.2.9.orig/newwin.c	2009-01-05 01:17:43.000000000 -0700
+++ netrek-client-cow-3.2.9/newwin.c	2009-01-20 15:32:11.000000000 -0700
@@ -91,6 +91,7 @@ extern void waraction(W_Event * data);
 
 /* Other function declarations */
 extern int smessage(char ichar);
+extern char *query_cowid(void);
 
 static int teamRequest(int team, int ship);
 
diff -urpN netrek-client-cow-3.2.9.orig/senddist.c netrek-client-cow-3.2.9/senddist.c
--- netrek-client-cow-3.2.9.orig/senddist.c	2009-01-05 01:17:39.000000000 -0700
+++ netrek-client-cow-3.2.9/senddist.c	2009-01-20 15:38:51.000000000 -0700
@@ -16,7 +16,7 @@
 #include "struct.h"
 #include "data.h"
 
-
+char *getaddr2(int flags, int recip);
 
 /* this loads all sorts of useful data into a distress struct. */
 struct distress *

Reply via email to