Coolmail segfaults

Bug #57632 reported by Maarten Mulders
4
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.

Revision history for this message
Michael Bienia (geser) wrote :

Here is a patch

--- coolmail-1.3.orig/coolmail.c
+++ coolmail-1.3/coolmail.c
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <pwd.h>

 #ifdef AUDIO
 #include <string.h>
@@ -96,7 +97,7 @@
 int main(int argc, char *argv[])
 {
    int reason;
- char username[L_cuserid];
+ 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 */
- strcat(mailfile_str, cuserid(username));
+ if (!(uid = getpwuid(geteuid()))) {
+ printf("Couldn't determine your username. Exiting.\n");
+ return 1;
+ }
+ strcat(mailfile_str, uid->pw_name);

    /* Initialize the renderer */
    rend_init(&argc, argv, (float)150.0);

Revision history for this message
Michael Bienia (geser) wrote :
Michael Bienia (geser)
Changed in coolmail:
status: Unconfirmed → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 29 Aug 2006 19:20:02 +0200
Source: coolmail
Binary: coolmail
Architecture: source
Version: 1.3-8ubuntu1
Distribution: edgy
Urgency: low
Maintainer: Fredrik Hallenberg <email address hidden>
Changed-By: Michael Bienia <email address hidden>
Description:
 coolmail - Mail notifier with 3d graphics
Changes:
 coolmail (1.3-8ubuntu1) edgy; urgency=low
 .
   * use getpwuid(geteuid()) instead of cuserid() (Closes Ubuntu: #57632)
Files:
 61224597d1772fa87a8c1c9520f575bc 621 mail optional coolmail_1.3-8ubuntu1.dsc
 9e73b1b6e51f7d67df0594e94b3e098a 3438 mail optional coolmail_1.3-8ubuntu1.diff.
gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFFJUye9GwFciKvaMRAjz3AJ0XVcwNtfi0ymQqYDJQriZqzwQcmACeJEqv
BpOPkIqbmewcLwRTwryca5M=
=UwBi
-----END PGP SIGNATURE-----

Changed in coolmail:
importance: Untriaged → Low
status: Confirmed → Fix Committed
Revision history for this message
Michael Bienia (geser) wrote :

Fixed in edgy

Changed in coolmail:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.