Ethereal-dev: Re: [Ethereal-dev] strcat

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sun, 28 Aug 2005 12:38:01 +0200
ronnie sahlberg wrote:

List, Guy

Now that all sprintf's are gone from the dissectors
Unfortunately, Joerg is correct, there are some more sprintfs in the code, even in epan/dissectors.

I'm currently working on a different topic, otherwise I would help you as I think it's worth doing it.

I would like to remove the 130 occurences of strcat.

Best would be to replace them with strlcat()   but how portable is that call?

Do we have strlcat() on all the platforms we support?
Win32 don't support strlcat.

It supports strncat but that won't be much of a help here.

We might need to add a strlcat implementation to the code. If you don't know the Win32 way to include this, I can help you on that and check if it's working.

BTW: the same applies to strlcpy for the same reasons. If you add support for strlcat you may add strlcpy as well.

Regards, ULFL

P.S: I've found an interesting article about strlcpy and strlcat: http://www.gratisoft.us/todd/papers/strlcpy.html