[Top][All Lists]

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

Re: SIGSEGV, Segmentation fault.

From: Igor Homyakov
Subject: Re: SIGSEGV, Segmentation fault.
Date: Fri, 23 May 2003 16:27:14 +0400
User-agent: Mutt/1.4.1i

* Martin Pala <martin.pala @ iol . cz> [030523 04:28]:
> You are rigth. It truncates the string to "size" - last character is 
> always '\0' (even if the string was longer then dst - test attached).
> There is only one advantage when using "size+1" long dst - in special 
> case where src is equal to dst, it won't truncate it, which is probably 
> better. 

from snprintf(3) OpenBSD:

     Be sure to use the proper secure idiom:

           snprintf(buffer, sizeof(buffer), "%s", string);

Igor Homyakov
<homyakov AT>

reply via email to

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