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@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
err_buf, sizeof(err_buf));
if( rc ){
err_buf[sizeof err_buf - 1] = '\0';
- fprintf(stderr, err_buf);
+ fprintf(stderr, "%s", err_buf);
if( rc < 0 )
rc = -rc;
}