[PATCH] ubi-utils: fix warning in fprintf() code

Artem Bityutskiy dedekind at infradead.org
Tue Jan 13 04:07:29 EST 2009


On Mon, 2009-01-12 at 11:08 -0500, Mike Frysinger wrote:
> When building with gcc security warnings enabled, the ubimirror.c code
> triggers this warning:
> ./src/ubimirror.c: In function 'main':
> ./src/ubimirror.c:206: error: format not a string literal and no format arguments
> 
> Since the buffer in question should be a straight string anyways, avoid
> ugly printf exploits by outputting the string indirectly:
> 	printf("%s", buffer)
> 
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>

Both patches are applied, thank you!

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list