DragonFly commits List (threaded) for 2007-03
DragonFly BSD
DragonFly commits List (threaded) for 2007-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/libiconv iconv.c


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 8 Mar 2007 18:38:52 +0100
Mail-followup-to: commits@crater.dragonflybsd.org

On Thu, Mar 08, 2007 at 09:20:00AM -0800, Matthew Dillon wrote:
> 
> :I'd prefer to return EINVAL instead.
> :
> :Joerg
> 
>     It would mean having to scan the strings checking for the \0.  You can't
>     safely call strlen().  If you want to do it, go ahead.  I just had that
>     patch sitting in my tree for a month and figured I should commit it.

In principle memchr. But we don't have that in the kernel right now. I'm
not bothered enough to change that, but it is wiser to not change the
input. E.g. if the overflow of the argument is not intentional, the
following arguments are incorrect anyway.

Joerg



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