ports/50570: This fixes radiusd-cistron-1.6.6 the utility raduse from dumping core.

Guy Fraser guy at sphinx.incentre.net
Thu Apr 3 18:00:35 UTC 2003


>Number:         50570
>Category:       ports
>Synopsis:       This fixes radiusd-cistron-1.6.6 the utility raduse from dumping core.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 03 10:00:31 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Guy Fraser
>Release:        FreeBSD 4.7-RELEASE-p2 i386
>Organization:
The Internet Centre.
>Environment:
System: FreeBSD sphinx.incentre.net 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #0: Thu Dec 19 13:37:12 MST 2002 root at sphinx.incentre.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
	The variable radwtmp_path in src/raduse.c in function main was not initailized.

>How-To-Repeat:
	/path/to/raduse -l
>Fix:
	I have supplied patches that fix this problem as well as a number of other compiler warnings due to other uninitialized variables.
	This is the first problem report I have submitted to FreeBSD, so if you want further reports submitted differently let me know.
	My email address is : guy_at_incentre_dot_net

--- patch-fd begins here ---
--- src/raduse.c	Mon May  7 14:33:45 2001
+++ src/raduse.c	Thu Apr  3 09:25:17 2003
@@ -271,7 +271,7 @@
 
 int main(int argc, char **argv)
 {
-  char *radwtmp_path;
+  char *radwtmp_path = RADWTMP;
   int wide = 0;
   int c;
   int offset = 0;
--- patch-fd ends here ---

--- patch-fe begins here ---
--- src/cache.c	Mon May  7 14:33:45 2001
+++ src/cache.c	Thu Apr  3 09:39:09 2003
@@ -51,7 +51,10 @@
  * in memory.  Returns -1 on failure, 0 on success.
  */
 int buildHashTable(void) {
-	FILE *passwd, *shadow;
+	FILE *passwd;
+#if !defined(NOSHADOW)
+	FILE *shadow;
+#endif /* SHADOW */  
 	char buffer[BUFSIZE];
 	char idtmp[10];
 	char username[MAXUSERNAME];
--- patch-fe ends here ---

--- patch-fg begins here ---
--- src/readusers.c	Sat Nov 10 05:41:39 2001
+++ src/readusers.c	Thu Apr  3 09:42:12 2003
@@ -179,7 +179,7 @@
 	char		*ptr;
 	char		buffer[256];
 	int		first = 1;
-	int		parsecode;
+	int		parsecode = 0;
 	int		state = 0;
 	int		c;
 
--- patch-fg ends here ---

--- patch-fh begins here ---
--- src/pair.c	Mon Nov 26 14:51:59 2001
+++ src/pair.c	Thu Apr  3 09:44:46 2003
@@ -429,9 +429,9 @@
 	VALUE_PAIR	*pair;
 	struct tm	*tm;
 	time_t		timeval;
-	int		operator;
+	int		operator = 0;
 	int		rcode;
-	int		tag;
+	int		tag = 0;
 
 	rcode = USERPARSE_EOS;
 	mode = PARSE_MODE_NAME;
--- patch-fh ends here ---

--- patch-fi begins here ---
--- src/radclient.c	Tue Nov 13 05:55:14 2001
+++ src/radclient.c	Thu Apr  3 09:46:58 2003
@@ -122,10 +122,10 @@
 	char			*radius_dir;
 	UINT4			server_ip;
 	int			port;
-	int			code;
+	int			code = 0;
 	int			sockfd;
 	int			salen;
-	int			result;
+	int			result = 0;
 	int			length;
 	int			i;
 
--- patch-fi ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list