Re: [PATCH] w: make sure utmp strings are really null terminated
"Craig Small" <[email protected]> ("csmall") Wed, 8 Mar 2023 07:34:27 +1100
| Newsgroups | gmane.linux.procps.devel |
|---|---|
| Message-ID | <CALy8Cw6a-Kc3Bfta8RLZUqNwj5WnGnZzAeoNcB34wMZbRvpvQQ@mail.gmail.com> |
--0000000000002baedd05f6555728 Content-Type: text/plain; charset="UTF-8" On Tue, 7 Mar 2023 at 21:49, Thorsten Kukuk <[email protected]> wrote: Hi Thorsten, > If the string has the max length for strncpy, strncpy does not null > terminate it. So the strncpy in this form is pretty useless, either > Ah yes, the old strncpy termination issue. > The patch also makes sure, that we use later the null terminated strings > for ut_user and ut_line and not this fields directly. > Thanks for the patch and welcome to the email list. Is Werner Fink still involved with procps on SuSE or there has been a change? I'll look at the other patch soon. - Craig --0000000000002baedd05f6555728 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Tue, 7 Mar 2023 at 21:49, Thorsten Kuk= uk <<a href=3D"mailto:[email protected]">dmarc-noreply@freelis= ts.org</a>> wrote:</div><div dir=3D"ltr"><br></div><div>Hi Thorsten,<br>= </div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex">If the string has the max length for strncpy, strncpy does not null= <br> terminate it. So the strncpy in this form is pretty useless, either<br></bl= ockquote><div>Ah yes, the old strncpy termination issue. <br></div><div>=C2= =A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The patch al= so makes sure, that we use later the null terminated strings<br> for ut_user and ut_line and not this fields directly.<br></blockquote><div>= Thanks for the patch and welcome to the email list. Is Werner Fink still in= volved with procps on SuSE or there has been a change?</div><div>I'll l= ook at the other patch soon.</div><div><br></div><div>=C2=A0- Craig</div><b= r></div></div> --0000000000002baedd05f6555728--