]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libhandle: Guard against string overflow in path_to_fspath()
authorEric Sandeen <sandeen@redhat.com>
Sat, 26 Jan 2013 22:40:25 +0000 (22:40 +0000)
committerMark Tinguely <tinguely@eagdhcp-232-136.americas.sgi.com>
Thu, 21 Feb 2013 16:09:11 +0000 (10:09 -0600)
commit55d1fd480b7328f0c51a7de5ed64ea371927c933
tree78d792ba2b30c1fce0d39edf2bf5412ed6f1cae9
parentb3a5164e6e474f03cd2d5e6d5168d4ced3d3282b
libhandle: Guard against string overflow in path_to_fspath()

path_to_fspath does a blind strcpy into an array of
MAXPATHLEN; we should be sure to limit this so that it
does not go over the size of the array.

I don't think I see a way to get here today with a too-long
path, but I don't think it'll 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>
libhandle/handle.c