Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Replaced sprintf and alike to the glib alternatives in the gtk di

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: Sat, 13 Mar 2004 18:32:37 +0100
Hi List!

I've finished replacing the sprintf and alike functions by their functional equivalent functions from glib in the gtk directory.

sprintf -> g_snprintf (sprintf is often the cause for trouble, as buffer overflows can easily occur)
snprintf -> g_snprintf
vsnprintf -> g_vsnprintf

This enabled me to remove:

#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif

from all the files in the gtk dir.


I've also made some other string related changes like using g_strdup where appropriate.

It might be possible that I've introduced new bugs, just let me know...

Regards, ULFL