diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2018-08-29 00:18:32 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-09-04 14:01:59 +0000 |
commit | 8612a1ca192333c2b760455661647d83bed2fd92 (patch) | |
tree | 238fbeab56fbfff4182583d89c9829197ba28876 /rpc/rpc-lib | |
parent | 13298d2b3893edb5d147ea3bcb9902ee5be4b3ad (diff) |
glusterd: Fix Buffer size issues
This patch fixes buffer size issue 1138522.
Change-Id: Ia12fc8f34f75704f8ed3efae2022c4fd67a8c76c
updates: bz#789278
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r-- | rpc/rpc-lib/src/protocol-common.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h index c26cb6966c7..1dfd6d5128b 100644 --- a/rpc/rpc-lib/src/protocol-common.h +++ b/rpc/rpc-lib/src/protocol-common.h @@ -277,7 +277,7 @@ typedef enum { struct gf_gsync_detailed_status_ { char node[NAME_MAX]; char master[NAME_MAX]; - char brick[NAME_MAX]; + char brick[PATH_MAX]; char slave_user[NAME_MAX]; char slave[NAME_MAX]; char slave_node[NAME_MAX]; @@ -369,9 +369,9 @@ typedef enum gf_getspec_flags_type gf_getspec_flags_type; #define GD_MGMT_HNDSK_PROGRAM 1239873 /* Completely random */ #define GD_MGMT_HNDSK_VERSION 1 -#define GD_VOLUME_NAME_MAX 256 /* Maximum size of volume name */ -#define GD_VOLUME_NAME_MAX_TIER (GD_VOLUME_NAME_MAX + 5) /*+5 needed for '-hot - and '-cold' suffixes*/ +#define GD_VOLUME_NAME_MAX ((NAME_MAX + 1) - 5) /* Maximum size of volume name */ +#define GD_VOLUME_NAME_MAX_TIER (GD_VOLUME_NAME_MAX + 5) /* +5 needed for '-hot' + and '-cold' suffixes*/ #define GLUSTER_PROCESS_UUID_FMT "CTX_ID:%s-GRAPH_ID:%d-PID:%d-HOST:%s-PC_NAME:%s-RECON_NO:%s" #endif /* !_PROTOCOL_COMMON_H */ |