[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils readutmp applies strchr to a non-string
From: |
Paul Jarc |
Subject: |
Re: coreutils readutmp applies strchr to a non-string |
Date: |
Sat, 12 Jun 2004 01:48:37 -0400 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
Paul Eggert <address@hidden> wrote:
> coreutils readutmp applies strchr to a buffer that is not
> null-terminated.
Would this work? It seems like the simplest fix.
- p = strchr (trimmed_name, ' ');
+ p = memchr (trimmed_name, ' ', sizeof (UT_USER (ut)) + 1);
paul