Whamcloud - gitweb
LU-9833 utils: resolve buffer over runs in lustre_rsync 14/31014/5
authorJames Simmons <uja.ornl@yahoo.com>
Fri, 12 Jan 2018 19:05:52 +0000 (14:05 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 26 Feb 2018 18:46:39 +0000 (18:46 +0000)
commit1216051bace3b341f59fef0925ccc458abb03b12
tree4a7a7304869d515fd3e143d6ca0c785ae34d9efb
parent88c64be4f4128a814fac109f9bdf1b8a8631124e
LU-9833 utils: resolve buffer over runs in lustre_rsync

Newer version of gcc will report of snprintf is used in an
incorrect way. For the case of the lustre_rsync application
many times two buffers of size PATH_MAX are being placed into
one buffer of the size PATH_MAX. This can easily lead to a
buffer overrun. This patch resolves those bugs.

Test-Parameters: trivial testlist=lustre-rsync-test

Lustre-change: https://review.whamcloud.com/30373
Lustre-commit: b9bdd849f076302550221ff195e83e31dd7bddfc

Change-Id: I035b4a3b1d9695a16822649c2165e492e9f2879d
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31014
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/utils/lustre_rsync.c