From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 23 Sep 2011 22:40:15 +0200 Subject: [U-Boot] [PATCH 0/4] Buffer overruns in printf In-Reply-To: <1316799532-20761-1-git-send-email-sjg@chromium.org> References: <1316799532-20761-1-git-send-email-sjg@chromium.org> Message-ID: <4E7CEEAF.2040709@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, Le 23/09/2011 19:38, Simon Glass a ?crit : > The printf family of functions in U-Boot cannot deal with a situation where > the caller provides a buffer which turns out to be too small for the format > string. This can result in buffer overflows, stack overflows and other bad > behavior. Indeed overruns can lead to bad behaviors, but in any case, it can never be recovered, because at the root, the problem is that the caller provided inconsistent arguments to printf. So in essence, you're 'fixing' printf for a design error in printf's caller, instead of fixing the design error. Amicalement, -- Albert.