Module: kamailio
Branch: master
Commit: 989ea3d60ac30d7ecf5a65094c941bc2dcf76629
URL:
https://github.com/kamailio/kamailio/commit/989ea3d60ac30d7ecf5a65094c941bc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-08-15T16:45:38+02:00
lib/srdb1: cast for signed comparison
---
Modified: src/lib/srdb1/db_ut.c
---
Diff:
https://github.com/kamailio/kamailio/commit/989ea3d60ac30d7ecf5a65094c941bc…
Patch:
https://github.com/kamailio/kamailio/commit/989ea3d60ac30d7ecf5a65094c941bc…
---
diff --git a/src/lib/srdb1/db_ut.c b/src/lib/srdb1/db_ut.c
index 1dfb4c80b3..39ac11d379 100644
--- a/src/lib/srdb1/db_ut.c
+++ b/src/lib/srdb1/db_ut.c
@@ -113,7 +113,7 @@ int db_str2uint(const char* _s, unsigned int* _v)
tmp = strtoul(_s, &p, 10);
if ((tmp == ULONG_MAX && errno == ERANGE) ||
- (tmp < INT_MIN) || (tmp > UINT_MAX)) {
+ ((long)tmp < INT_MIN) || (tmp > UINT_MAX)) {
LM_ERR("Value out of range\n");
return -1;
}