Module: kamailio Branch: master Commit: 15b2a5467f11e009ae4efad1ee29af860326095f URL: https://github.com/kamailio/kamailio/commit/15b2a5467f11e009ae4efad1ee29af860326095f
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2024-07-18T12:17:10+02:00 core: set digit 0 in the md5 buffer in case of error inside char_msg_val() --- Modified: src/core/char_msg_val.h --- Diff: https://github.com/kamailio/kamailio/commit/15b2a5467f11e009ae4efad1ee29af860326095f.diff Patch: https://github.com/kamailio/kamailio/commit/15b2a5467f11e009ae4efad1ee29af860326095f.patch --- diff --git a/src/core/char_msg_val.h b/src/core/char_msg_val.h index b3d7e4a1bea..bcdea56b85e 100644 --- a/src/core/char_msg_val.h +++ b/src/core/char_msg_val.h @@ -41,8 +41,11 @@ inline static int char_msg_val(struct sip_msg *msg, char *cv) str sempty = str_init(""); if(unlikely(!check_transaction_quadruple(msg))) { - LM_ERR("can't calculate char_value due to a parsing error\n"); - memset(cv, '0', MD5_LEN); + int i; + for(i = 0; i < MD5_LEN; i++) { + cv[i] = '0'; + } + LM_ERR("cannot calculate char_value due to a parsing error\n"); return 0; } /* to body is automatically parsed (via check_transactionquadruple / _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org