Skip to content

Commit 244cc92

Browse files
committed
next_branches(): Fix infinite looping during error handling
If someone has actually taken the time to corrupt the internal "$avp(serial_branch)" AVP, do not perform the "infinite while loop dance" and correctly progress to the next AVP.
1 parent 578fc29 commit 244cc92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

serialize.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ int next_branches( struct sip_msg *msg)
368368

369369
if (!val.s.s) {
370370
LM_ERR("invalid avp value\n");
371-
continue;
371+
goto next_avp;
372372
}
373373

374374
p = val.s.s;
@@ -402,6 +402,7 @@ int next_branches( struct sip_msg *msg)
402402
goto error1;
403403
}
404404

405+
next_avp:
405406
last_parallel_fork = (avp->flags & Q_FLAG);
406407
prev = avp;
407408
avp = search_next_avp(avp, &val);

0 commit comments

Comments
 (0)