diff options
author | Raghavendra Talur <rtalur@redhat.com> | 2014-01-30 19:50:06 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-02-05 23:05:34 -0800 |
commit | 3bc23e1ad08e212538d325ec0196ec7488ae7e62 (patch) | |
tree | 05b95af125145ec01c1484147146af59fc3dc23f /xlators/features/changelog/src | |
parent | e3162ed7e91510185316eae36f5c2c25bde53a68 (diff) |
changelog: Restrict length of unix socket files to UNIX_PATH_MAX.
Bug fix for Coverity-CID 1124847.
Change-Id: I410ef8e06cbc491b1f72535298fae5e9bc77220d
BUG: 789278
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/6870
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src')
-rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 2 | ||||
-rw-r--r-- | xlators/features/changelog/src/changelog-notifier.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h index 16d60b99bf2..b441f706869 100644 --- a/xlators/features/changelog/src/changelog-helpers.h +++ b/xlators/features/changelog/src/changelog-helpers.h @@ -125,7 +125,7 @@ typedef struct changelog_notify { pthread_t notify_th; /* unique socket path */ - char sockpath[PATH_MAX]; + char sockpath[UNIX_PATH_MAX]; int socket_fd; diff --git a/xlators/features/changelog/src/changelog-notifier.c b/xlators/features/changelog/src/changelog-notifier.c index 1f8b312538e..5f3d063a8ad 100644 --- a/xlators/features/changelog/src/changelog-notifier.c +++ b/xlators/features/changelog/src/changelog-notifier.c @@ -178,7 +178,7 @@ changelog_notifier (void *data) } CHANGELOG_MAKE_SOCKET_PATH (priv->changelog_brick, - cn->sockpath, PATH_MAX); + cn->sockpath, UNIX_PATH_MAX); if (unlink (cn->sockpath) < 0) { if (errno != ENOENT) { gf_log (this->name, GF_LOG_ERROR, |