On Sun, March 14, 2010, Carlos R. Mafra wrote:

> I am not an expert on this, but the rant on the above page has a 
> point about strlcpy() hiding bugs, IMHO. So I guess simply
> religiouly converting strncpy() (or worse strcpy()) to strlcpy() 
> may not be always the right thing to do. 

I agree to this point. Having been in charge for maintaining a
piece of software which runs continuously on a server I can only
stress that getting the memory management right is an essential
task which needs to be done (and done often!).

One could think of replacing strcpy() and strncpy() by a macro
which can be configured to execute either family of the string
functions. But I'd only like to do this if we had some people
regularly running a 'conventional' WM in valgrind and looking
for memory leaks pointers running wild etc.

Also: is this top priority? On my system WM runs 7 days a week,
is heavily used 9+ hours a day for 5 days a week, and it has
been very long since I had the last crash.

As an alternative one might want to start annotating the code
for use with static source code checkers, like flexelint or
splint. However converting software which has not been developed 
witht the help of such tools is usually quite a big task...

Cheers,

M'bert

-- 
----------- / http://herbert.the-little-red-haired-girl.org / -------------
=+= 
Amongst our weaponry are such diverse elements as: fear, surprise, 
ruthless efficiency, an almost fanatical devotion to the Pope, and 
nice red uniforms - Oh damn!


-- 
To unsubscribe, send mail to [email protected].

Reply via email to