This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FW: Bug in diag_[v]snprintf


-----Original Message-----
From: BINDER Thomas 
Sent: Dienstag, 08. Februar 2005 16:18
To: CSEBITS Christoph
Subject: Bug in diag_[v]snprintf

Hi

We found a problem in the implementation of diag_snprintf, and
diag_vsnprintf. The functions effectively write len+1 bytes (instead of len
bytes) to the character buffer.

According to the man page of snprintf this behaviour is wrong:

	 [...]
       strings).  snprintf and vsnprintf do not write  more  than
       size bytes (including the trailing '\0'), and return -1 if
       [...]



Best regards,
Tom

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]