]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_fsr: guard against path string overflows
authorEric Sandeen <sandeen@redhat.com>
Sat, 26 Jan 2013 22:40:29 +0000 (22:40 +0000)
committerMark Tinguely <tinguely@eagdhcp-232-136.americas.sgi.com>
Thu, 21 Feb 2013 16:09:11 +0000 (10:09 -0600)
commit6063fecad207d13981dea3e20f89f7ac4c3fb26f
treed043a4f83b62560dc2465de6720846c4fc4d36c4
parent50c79b8df93c45495e81c15aca65abde469f1565
xfs_fsr: guard against path string overflows

gettmpname() and getparent() blindly copy strings
into a target array; be sure we limit the copy to
the size of the target and null terminate it.

I don't see a way to get here with a too-long name,
since most paths try to open or stat the file already,
but it can't hurt to be defensive.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
fsr/xfs_fsr.c