osaf/libs/common/clmsv/clmsv_enc_dec.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Set zeros in SaNameT value before SaNameT is populated with incoming SaNameT 
string from the network.
This will make node name unique in patricia tree, and the node name search 
mismatch will be avoided.

diff --git a/osaf/libs/common/clmsv/clmsv_enc_dec.c 
b/osaf/libs/common/clmsv/clmsv_enc_dec.c
--- a/osaf/libs/common/clmsv/clmsv_enc_dec.c
+++ b/osaf/libs/common/clmsv/clmsv_enc_dec.c
@@ -42,6 +42,7 @@ uint32_t clmsv_decodeSaNameT(NCS_UBAID *
        total_bytes += 2;
        ncs_decode_n_octets_from_uba(uba, (uint8_t *)value, (uint32_t)length);
        value[length] = 0;
+       memset(name, 0, sizeof(SaNameT));
        osaf_extended_name_lend(value, name);
        total_bytes += length;
        return total_bytes;

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to