Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



>in (nearly?) all the cases i looked at the "assumptions" were present
>only in the code of the block changed.  in particular the MALLOC() case
>you present is *100%* a red-herring.  these are *exactly* the safe uses
>of strc* that should be left alone.  avoiding implicit assuptions such
>as your "foo.h" example is a good idea (i'm sure they exist even though
>my sample of your changes didn't seem to include any like that) but only
>those cases seem to be worth changing.

        if it's not strcpy() after MALLOC(len + 1), it is "foo.h" case.
        i know this because, before i put sizeof() at the end of arg list,
        i need to check what kind of type "dst" arg is.  when it is an array,
        in many cases their size is hardcoded (like bar[16]).

>>      i am doing it with reason.  care to provide asm version of strlcpy? :-)
>
>but it's not necessarily a *good* reason.  please stop converting any
>more code until it's shown to be a good reason.

        determined by whom?  and why should i obey you?

>my original post about
>this issue asked for actual *problems* being solved to be listed, but
>besides the "foo.h" case (of which no actual bugs have been fixed?) i'm
>really not seeing anything yet.

        bzzt, there was a off-by-one error as seen in commit message.

itojun



Home | Main Index | Thread Index | Old Index