Coolmail segfaults
Bug #57632 reported by
Maarten Mulders
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coolmail (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: coolmail
After installing coolmail for my amd64-based Kubuntu 6.06.1 LTS, I try to start it using Konsole. It quits immediately with a segmentation fault.
Don't know what else to report. Any questions concerning this can be asked here.
Changed in coolmail: | |
status: | Unconfirmed → Confirmed |
To post a comment you must log in.
Here is a patch
--- coolmail- 1.3.orig/ coolmail. c 1.3/coolmail. c
+++ coolmail-
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <pwd.h>
#ifdef AUDIO L_cuserid] ;
#include <string.h>
@@ -96,7 +97,7 @@
int main(int argc, char *argv[])
{
int reason;
- char username[
+ struct passwd *uid;
/* Quickly scan for the -h option -- if it is present don't do anything
* but print out some help and exit. */
@@ -104,7 +105,11 @@
return(0);
/* Get the username and use it to create a default mailfile name */ mailfile_ str, cuserid(username)); geteuid( )))) { mailfile_ str, uid->pw_name);
- strcat(
+ if (!(uid = getpwuid(
+ printf("Couldn't determine your username. Exiting.\n");
+ return 1;
+ }
+ strcat(
/* Initialize the renderer */ init(&argc, argv, (float)150.0);
rend_