Re: TextBuffer Help



Hi

Maybe you should try sprintf() instead of printf() to format and write
the gint into a string,

I can't understand that people still propose the use of
sprintf/strcpy etc. This function are responsible for most
buffer overflows in code. I've spend weeks to remove the use
of this functions in crappy code.

glib provide much better an easier functions (g_strdup_printf,
g_snprintf etc.).

If you like to use char arrays without glib, then please use
the "n" versions snprintf() and strncpy().


My 2 cents

Andreas Stricker





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