From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10440 invoked by alias); 26 Jun 2009 11:53:00 -0000 Received: (qmail 10429 invoked by uid 22791); 26 Jun 2009 11:52:59 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from anika.2020media.com (HELO smtp.2020smtp.net) (212.124.192.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Jun 2009 11:52:49 +0000 Received: from [212.124.199.38] (helo=[192.168.0.2]) by smtp.2020smtp.net with esmtp (Exim 4.63) (envelope-from ) id 1MK9yz-0004Cg-DC for ecos-devel@ecos.sourceware.org; Fri, 26 Jun 2009 12:52:41 +0100 Message-ID: <4A44B683.5060602@zynaptic.com> Date: Fri, 26 Jun 2009 11:53:00 -0000 From: Chris Holgate User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: ecos-devel@ecos.sourceware.org Subject: Should we add compiler warnings to diag_sprintf & diag_vsprintf ? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-06/txt/msg00037.txt.bz2 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.