[sr-dev] git:master:b7fa610c: core: resolve - use macro value for comparison

Daniel-Constantin Mierla miconda at gmail.com
Wed Mar 16 09:23:03 CET 2022


Module: kamailio
Branch: master
Commit: b7fa610ca381dff572d0276fabe7101acdc3ced1
URL: https://github.com/kamailio/kamailio/commit/b7fa610ca381dff572d0276fabe7101acdc3ced1

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-16T08:35:24+01:00

core: resolve - use macro value for comparison

---

Modified: src/core/resolve.c

---

Diff:  https://github.com/kamailio/kamailio/commit/b7fa610ca381dff572d0276fabe7101acdc3ced1.diff
Patch: https://github.com/kamailio/kamailio/commit/b7fa610ca381dff572d0276fabe7101acdc3ced1.patch

---

diff --git a/src/core/resolve.c b/src/core/resolve.c
index c2ea36d9ec..336b958ea3 100644
--- a/src/core/resolve.c
+++ b/src/core/resolve.c
@@ -841,7 +841,7 @@ struct rdata* get_record(char* name, int type, int flags)
 #endif
 		p+=skip;
 		rec_name_len=strlen(rec_name);
-		if (unlikely(rec_name_len>255)){
+		if (unlikely(rec_name_len>MAX_DNS_NAME-2)){
 			LM_ERR("dn_expand(rec_name): name too long (%d)\n",
 					rec_name_len);
 			goto error;




More information about the sr-dev mailing list