emacs-devel
[Top][All Lists]
Advanced

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

Re: Let's tell we are using GTK+


From: Lute Kamstra
Subject: Re: Let's tell we are using GTK+
Date: Tue, 19 Aug 2003 11:46:21 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Terje Rosten <address@hidden> writes:

> * Lute Kamstra
> | 
> | Maybe the GTK version should be mentioned as well.
>
> Updated patches with version information and the (annoying?) +
> sign removed. emacs-version will now display something like this:
>
>  GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, GTK+ 2.2.1) of 2003-08-04 on 
>  myhost.net

I like it, but...

[...]

> +  {
> +    char gtk_version[8];
> +    sprintf (gtk_version, "%d.%d.%d", GTK_MAJOR_VERSION, GTK_MINOR_VERSION,
> +          GTK_MICRO_VERSION);
> +    Vgtk_version_string = build_string (gtk_version);
> +  }

this seems vulnerable to a buffer overflow.  It is acceptable to use
snprintf instead, or isn't that portable enough?  (I'm not really
intimate with C.)  What could be used instead, a larger string?


  Lute.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]