[sr-dev] git:master:44e48809: core: log printed size, current token size and buffer size for pv printf overflow
Daniel-Constantin Mierla
miconda at gmail.com
Wed Feb 13 09:43:19 CET 2019
Module: kamailio
Branch: master
Commit: 44e48809a608d4de46d61198137cd669c6a4763f
URL: https://github.com/kamailio/kamailio/commit/44e48809a608d4de46d61198137cd669c6a4763f
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-02-13T09:42:08+01:00
core: log printed size, current token size and buffer size for pv printf overflow
---
Modified: src/core/pvapi.c
---
Diff: https://github.com/kamailio/kamailio/commit/44e48809a608d4de46d61198137cd669c6a4763f.diff
Patch: https://github.com/kamailio/kamailio/commit/44e48809a608d4de46d61198137cd669c6a4763f.patch
---
diff --git a/src/core/pvapi.c b/src/core/pvapi.c
index 23d70ba6df..59a76831e8 100644
--- a/src/core/pvapi.c
+++ b/src/core/pvapi.c
@@ -1434,7 +1434,8 @@ int pv_printf(struct sip_msg* msg, pv_elem_p list, char *buf, int *len)
n += it->text.len;
cur += it->text.len;
} else {
- LM_ERR("no more space for text [%d]\n", it->text.len);
+ LM_ERR("no more space for text value - printed:%d token:%d buffer:%d\n",
+ n, it->text.len, *len);
goto overflow;
}
}
@@ -1453,7 +1454,8 @@ int pv_printf(struct sip_msg* msg, pv_elem_p list, char *buf, int *len)
cur += tok.rs.len;
}
} else {
- LM_ERR("no more space for spec value\n");
+ LM_ERR("no more space for spec value - printed:%d token:%d buffer:%d\n",
+ n, tok.rs.len, *len);
goto overflow;
}
}
More information about the sr-dev
mailing list