Skip to content

Commit

Permalink
Fixed undefined int_value
Browse files Browse the repository at this point in the history
  • Loading branch information
vladpaiu committed Dec 5, 2024
1 parent f324a1a commit ae113c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/json/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ int pv_get_json_ext(struct sip_msg* msg, pv_param_t* pvp, pv_value_t* val, int
json_t * obj;
json_name * id = (json_name *) pvp->pvn.u.dname;
UNUSED(id);
int64_t int_value;

if( expand_tag_list( msg, ((json_name *)pvp->pvn.u.dname)->tags ) < 0)
{
Expand Down Expand Up @@ -461,7 +462,7 @@ int pv_get_json_ext(struct sip_msg* msg, pv_param_t* pvp, pv_value_t* val, int
val->rs.s = sint2str(int_value, &val->rs.len);
if (int_value<=INT_MAX && int_value>=INT_MIN) {
/* safe to store it as an INT in the pvar */
val->ri = int_value;;
val->ri = int_value;
val->flags |= PV_VAL_INT|PV_TYPE_INT|PV_VAL_STR;
} else {
/* we would overflow/underflow, store as string only */
Expand Down

0 comments on commit ae113c7

Please sign in to comment.