Module: kamailio
Branch: master
Commit: 30c42aab767d777e3beb1493165458489957e92d
URL:
https://github.com/kamailio/kamailio/commit/30c42aab767d777e3beb14931654584…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-21T13:30:26+01:00
core: resolve - cast after pointer operations for RES_AR
---
Modified: src/core/resolve.c
---
Diff:
https://github.com/kamailio/kamailio/commit/30c42aab767d777e3beb14931654584…
Patch:
https://github.com/kamailio/kamailio/commit/30c42aab767d777e3beb14931654584…
---
diff --git a/src/core/resolve.c b/src/core/resolve.c
index 56d189f1ab1..36ea073bc5b 100644
--- a/src/core/resolve.c
+++ b/src/core/resolve.c
@@ -1026,7 +1026,7 @@ struct rdata *get_record(char *name, int type, int flags)
/* check if enough space is left for type, class, ttl & size */
if(unlikely((p + 2 + 2 + 4 + 2) > end))
goto error_boundary;
- memcpy((void *)&rdlength, (void *)p + 2 + 2 + 4, 2);
+ memcpy((void *)&rdlength, (void *)(p + 2 + 2 + 4), 2);
p += 2 + 2 + 4 + 2 + ntohs(rdlength);
}
answers_no = ntohs((unsigned short)buff.hdr.arcount);