[PATCH, v2] xfsdump: fix format string in restore_spec()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Reported-by: Nigel Tamplin <ntamplin@xxxxxxxxxxxxxxx>
Tested-by: Nigel Tamplin <ntamplin@xxxxxxxxxxxxxxx>
---
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 );

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux