path: root/tests/utils
diff options
authorKrutika Dhananjay <>2012-11-28 22:29:36 +0530
committerAnand Avati <>2012-12-19 13:18:58 -0800
commitda7ca1efcf3a621c27f05d621715e57fdc5aa397 (patch)
tree59d2ae86837f00d68a1348604ba5a9a2c70b9221 /tests/utils
parent6b0d888e0729e7f7922d9b0a76dc27bae724e812 (diff)
protocol/server: Do not access key after GF_FREE in _delete_auth_opt()
PROBLEMS: 1.'key' becomes a dangling pointer after the first call to dict_del() returns, in _delete_auth_opt(). Therefore, the second call to fnmatch() is made with 'key' pointing to deallocated space. 2. Also, the name _delete_auth_opt seems to suggest that the function is intended to match and delete "auth" options from the dictionary. But it winds up deleting all the options irrespective of whether the pattern match was successful or not. The same is true with _copy_auth_opt(). FIX: Changed _delete_auth_opt() to delete the key ONLY if it matches either of the two patterns (auth.addr.*.allow and auth.addr.*.reject). Similarly, changed _copy_auth_opt() along the same lines. Change-Id: Ic8664e5a0a29cefe43cb59a27e32fbdbeac154b5 BUG: 881062 Signed-off-by: Krutika Dhananjay <> Reviewed-on: Reviewed-by: Pranith Kumar Karampuri <> Tested-by: Gluster Build System <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'tests/utils')
0 files changed, 0 insertions, 0 deletions