[PATCH 2/9] xfsdump: Fix overflow of "question" string in Media_prompt_erase()

Christoph Hellwig hch at infradead.org
Wed Nov 12 12:58:45 CST 2014


On Wed, Nov 12, 2014 at 12:57:11PM -0600, Eric Sandeen wrote:
> The string we were sprintf'ing is trivially longer than the array
> we allocated for it.
> 
> Allocate something big enough, and snprintf to avoid overflow

How about switching it to asprintf() to get rid of that dangerous static
buffer entirely?



More information about the xfs mailing list