[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix for an unlikely core dump in 'who' and 'pinky'
From: |
Jim Meyering |
Subject: |
Re: fix for an unlikely core dump in 'who' and 'pinky' |
Date: |
Sun, 20 Jun 2004 08:58:40 +0200 |
Paul Eggert <address@hidden> wrote:
> 'who' and 'pinky' both assume that ctime never fails, but this isn't
> true on hosts with 64-bit time_t and 32-bit int. Here's a patch.
>
> 2004-06-19 Paul Eggert <address@hidden>
>
> Don't dump core if ctime returns NULL; this is possible on
> hosts with 64-bit time_t and 32-bit int.
> * src/who.c: Include "inttostr.h".
> (time_string): If ctime fails, print the raw time as an integer
> instead of dumping core.
> * src/pinky.c: Likewise, as follows:
> Include "inttostr.h".
> (time_string): New function, copied from who.c.
> (print_entry): Use it.
Applied. Thanks.
I also applied your other one:
* src/who.c (print_line): Don't truncate user names at 8 bytes.