filefrag: avoid temporary buffer overflow

If an unknown flag is present in a FIEMAP extent, it is printed as a
hex value into a temporary buffer before adding it to the flags.  If
that unknown flag is over 0xfff then it will overflow the temporary

Reported-by: Sarah Liu <>
Signed-off-by: Andreas Dilger <>
Signed-off-by: Theodore Ts'o <>
1 file changed