diff options
author | Venkatesh Somyajulu <vsomyaju@redhat.com> | 2013-04-03 17:30:37 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-04-12 00:21:09 -0700 |
commit | d836002fce7454fabd13f0f9a1fd247bec7e7fc0 (patch) | |
tree | 54b7abeac7341a8deb5b09971d78a7ca4577dd0b | |
parent | 650708316527346ae47ff129fba55f455f2fcfb4 (diff) |
dict: Put "goto out" in dict_unserialize to avoid process crashv3.3.2qa1
Problem:
In the dictionary serialization function, if the
[(buf + vallen) > (orig_buf + size)], then memdup is getting failed.
Fix:
Put "goto out" whenever this condition is met.
Change-Id: Ia10ddc7e1cf551eed0e2c3d0f0364c6961e13025
BUG: 947824
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4770
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
-rw-r--r-- | libglusterfs/src/dict.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c index ee265c9db..3d30dd689 100644 --- a/libglusterfs/src/dict.c +++ b/libglusterfs/src/dict.c @@ -2422,6 +2422,7 @@ dict_unserialize (char *orig_buf, int32_t size, dict_t **fill) "available (%lu) < required (%lu)", (long)(orig_buf + size), (long)(buf + vallen)); + goto out; } value = get_new_data (); value->len = vallen; |