utmp ut_syslen bug?

Frank Cusack fcusack at fcusack.com
Mon Jan 15 13:48:11 EST 2007


loginrec.c:794

        /* ut_syslen is the length of the utx_host string */
        utx->ut_syslen = MIN(strlen(li->hostname), sizeof(utx->ut_host));

But utmpx.h (on Solaris) says:

        short   ut_syslen;              /* significant length of ut_host */
                                        /*   including terminating null */

So shouldn't the code above add +1 in the strlen case?

-frank


More information about the openssh-unix-dev mailing list