diff options
author | Jim Meyering <meyering@redhat.com> | 2012-06-04 16:41:17 +0200 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-02 15:30:54 -0700 |
commit | 64a2627cc1cfb8cc547c160c2362d05401b8ed87 (patch) | |
tree | 21889da7172883968e63cd33d401a1162a2a289a /cli | |
parent | d1610978436dda903e50552eed0cb8116dae88b9 (diff) |
bdb: fix erroneous strncpy in file name construction
Using strncpy like that fails to copy the trailing NUL byte of
dirent->d_name, which is required, since the result buffer,
entry_path is stat'ed in the code just below. Besides, there is
no need for strncpy, since we know the source buffer will fit
in the possibly-just-realloc'd destination buffer: use memcpy
and +1 to include the trailing NUL.
Change-Id: I4d4cfb5b7df3c018516919f2d67c21c07de126cb
BUG: 789278
Signed-off-by: Jim Meyering <meyering@redhat.com>
Reviewed-on: http://review.gluster.com/3588
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli')
0 files changed, 0 insertions, 0 deletions