[PATCH, v2] xfsdump: fix format string in restore_spec()
Alex Elder
elder at inktank.com
Thu Dec 27 08:10:14 CST 2012
Nigel Tamplin reported getting a seg fault in xfsrestore when a path
name was too long. He correctly diagnosed that the problem was due
to an extra "%s" format specifier in the format value passed to a
call to mlog(). This patch corrects that.
Signed-off-by: Alex Elder <elder at inktank.com>
Reported-by: Nigel Tamplin <ntamplin at codefaber.co.uk>
Tested-by: Nigel Tamplin <ntamplin at codefaber.co.uk>
---
v2: drop the %s rather than adding a strerror() call for it
restore/content.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/restore/content.c
===================================================================
--- a/restore/content.c
+++ b/restore/content.c
@@ -7796,7 +7796,7 @@ restore_spec( filehdr_t *fhdrp, rv_t *rv
if ( strlen( path ) >= sizeof( addr.sun_path )) {
mlog( MLOG_VERBOSE | MLOG_WARNING, _(
"pathname too long for bind of "
- "%s ino %llu %s: %s: discarding\n"),
+ "%s ino %llu %s: discarding\n"),
printstr,
fhdrp->fh_stat.bs_ino,
path );
More information about the xfs
mailing list