This is the mail archive of the ecos-devel@sourceware.org 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]

Should we add compiler warnings to diag_sprintf & diag_vsprintf ?


Hi folks,

I've just had to add support for diag_vsnprintf to diag.h as part of
writing some logging code.  We all know that sprintf, vsprintf and their
 evil unchecked spawn are the source of lots of buffer overflow bugs -
so while I'm prepping a patch for this change is it worth adding
compiler warning attributes to diag_sprintf and diag_vsprintf to help
'discourage' their use?

Chris.


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