Bug 50570 - This fixes radiusd-cistron-1.6.6 the utility raduse from dumping core.
Summary: This fixes radiusd-cistron-1.6.6 the utility raduse from dumping core.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-03 19:00 UTC by Guy Fraser
Modified: 2003-04-06 19:47 UTC (History)
0 users

See Also:


Attachments
patch-fd (243 bytes, text/plain)
2003-04-03 19:00 UTC, Guy Fraser
no flags Details
patch-fg (230 bytes, text/plain)
2003-04-03 19:00 UTC, Guy Fraser
no flags Details
patch-fi (294 bytes, text/plain)
2003-04-03 19:00 UTC, Guy Fraser
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Fraser 2003-04-03 19:00:31 UTC
	The variable radwtmp_path in src/raduse.c in function main was not initailized.

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

--- 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 ---

--- 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 ---
How-To-Repeat: 	/path/to/raduse -l
Comment 1 Norikatsu Shigemura freebsd_committer 2003-04-06 14:33:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer.
Comment 2 Dirk Meyer freebsd_committer 2003-04-06 19:45:13 UTC
State Changed
From-To: open->closed

committed, thanks. 

Well done, 
Unified diffs are fine, even the pathnames are well adjusted.