mirror of https://github.com/sipwise/kamailio.git
Change-Id: Ic10d04559f53deaa552fd808cac88d10f11d35b2mr11.3
parent
3351788015
commit
831a1475ea
@ -0,0 +1,34 @@
|
||||
From: Victor Seva <vseva@sipwise.com>
|
||||
Date: Fri, 24 Mar 2023 10:26:15 +0100
|
||||
Subject: app_lua: fix crash on exausted memory scenario
|
||||
|
||||
---
|
||||
src/modules/app_lua/app_lua_api.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/modules/app_lua/app_lua_api.c b/src/modules/app_lua/app_lua_api.c
|
||||
index 0a1d135..1010fc5 100644
|
||||
--- a/src/modules/app_lua/app_lua_api.c
|
||||
+++ b/src/modules/app_lua/app_lua_api.c
|
||||
@@ -912,6 +912,10 @@ void sr_kemi_lua_push_dict(lua_State *L, sr_kemi_dict_item_t *item) {
|
||||
void
|
||||
sr_kemi_lua_push_dict_item(lua_State *L, sr_kemi_dict_item_t *item)
|
||||
{
|
||||
+ if(!item) {
|
||||
+ LM_CRIT("BUG: dict field empty\n");
|
||||
+ return;
|
||||
+ }
|
||||
switch(item->vtype) {
|
||||
case SR_KEMIP_NONE:
|
||||
LM_CRIT("BUG: vtype is NONE\n");
|
||||
@@ -951,6 +955,10 @@ sr_kemi_lua_push_dict_item(lua_State *L, sr_kemi_dict_item_t *item)
|
||||
*/
|
||||
int sr_kemi_lua_return_xval(lua_State* L, sr_kemi_t *ket, sr_kemi_xval_t *rx)
|
||||
{
|
||||
+ if(!rx) {
|
||||
+ LM_CRIT("BUG: xval field empty\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
switch(rx->vtype) {
|
||||
case SR_KEMIP_NONE:
|
||||
return 0;
|
||||
Loading…
Reference in new issue