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

Ethereal-dev: RE: [Ethereal-dev] Why not use g_snprint() instead of snprintf() / NEED_SNPRINT

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

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Fri, 12 Mar 2004 14:04:59 +0100
|From: Ulf Lamping
|
|Hi List!
|
|All over the code, something like:
|
|#ifdef NEED_SNPRINTF_H
|# include "snprintf.h"
|#endif
|
|in combination with snprintf() can be found.
|
|
|Why not use GLIBs "String Utility Functions", and get rid of 
|this setting?
|
|snprintf -> g_snprintf
|vsnprintf -> g_vsnprintf
|...

I concur with Ulf.

|This might also be true for some other (potentially unsecure) string 
|functions like sprintf all over the code.

Again, I agree 100%.

|However, it may be necessary to keep some source files independant of 
|the GLIB, but I don't see currently any place, where this 
|might be the true.

True, but not for the Glib functions. Ethereal is heavily dependent of Glib.

That's probably something I can deal with (too) when rewriting the autotools
files.

Regards,

Olivier