Re: strlcat()/strlcpy(): can it be added to glib now?



"David Wheeler" <dwheeler@ida.org> writes:

> On June 14 I submitted a revised patch to add g_strlcat() and g_strlcpy()
> to glib. I haven't heard any negative reaction to it, but I think it got
> lost in the sea of other changes.  Can this patch be applied now?

If people want to see some arguments for why some people consider 
strlc* harmful, look at the recent thread titled:

 PATCH: safe string copy and concetation

At:

  http://sources.redhat.com/ml/libc-alpha/2000-08/threads.html

I can't really bring myself to care that much - I tend to avoid
to avoid fixed size buffers, and I think that is the GLib style.

(Yes, there is an argument that alloc'ing your buffers arbitrarily
big allows DOS attacks. But in most cases, that doesn't matter.)

If people want to add g_strl*, it's not a big concern to me,
though you won't find me using them.

                                        Owen




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