From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23372 invoked by alias); 21 Jan 2006 17:45:13 -0000 Received: (qmail 23364 invoked by uid 48); 21 Jan 2006 17:45:11 -0000 Date: Sat, 21 Jan 2006 17:45:00 -0000 Message-ID: <20060121174511.23363.qmail@sourceware.org> From: "marvin dot nospam at gmail dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20051203125947.1973.marvin.nospam@gmail.com> References: <20051203125947.1973.marvin.nospam@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/1973] getenv returns pointer to unallocated space. X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00127.txt.bz2 List-Id: ------- Additional Comments From marvin dot nospam at gmail dot com 2006-01-21 17:45 ------- I received more e-mails from people reporting this segmentation fault in my program. I know what you are thinking ("it is a bug in your program"), but just look at the code: --------------------------------- void read_plugins (KTPluginList *plugin_list) /* Input: - Output: plugin_list - The plugins are added to this list. Returns: - Description: This function reads the plugins from the plugin directories and adds them to plugin_list. */ { char *home_dir, *local_plugin_dir; int local_plugin_dir_len; read_plugin_dir (PLUGIN_DIR, plugin_list); home_dir = (char *)getenv("HOME"); if (home_dir != NULL) { local_plugin_dir_len = strlen(home_dir)+strlen("/"LOCAL_PLUGIN_DIR); local_plugin_dir = keytouch_malloc(local_plugin_dir_len+1); strcpy (local_plugin_dir, home_dir); strcat (local_plugin_dir, "/"LOCAL_PLUGIN_DIR); read_plugin_dir (local_plugin_dir, plugin_list); free (local_plugin_dir); } } --------------------------------- I only received reports from people using an AMD64. -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME | http://sourceware.org/bugzilla/show_bug.cgi?id=1973 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.