Module: kamailio
Branch: master
Commit: c464add1531aea5fda3f7c5a6670bd90e7ac594b
URL:
https://github.com/kamailio/kamailio/commit/c464add1531aea5fda3f7c5a6670bd9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-02-13T09:51:51+01:00
xprint: cast to uint64_t when using time_t value
---
Modified: src/modules/xprint/xp_lib.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c464add1531aea5fda3f7c5a6670bd9…
Patch:
https://github.com/kamailio/kamailio/commit/c464add1531aea5fda3f7c5a6670bd9…
---
diff --git a/src/modules/xprint/xp_lib.c b/src/modules/xprint/xp_lib.c
index 06b744fe92..3b1c59e57c 100644
--- a/src/modules/xprint/xp_lib.c
+++ b/src/modules/xprint/xp_lib.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <time.h>
#include <unistd.h>
@@ -144,7 +145,7 @@ static int xl_get_times(struct sip_msg *msg, str *res, str *hp, int
hi, int hf)
msg_tm = time(NULL);
msg_id = msg->id;
}
- ch = int2str_base_0pad(msg_tm, &l, hi, hi==10?0:8);
+ ch = int2str_base_0pad((unsigned int)(uint64_t)msg_tm, &l, hi, hi==10?0:8);
res->s = ch;
res->len = l;