2
0
Эх сурвалжийг харах

core: Fix crash in xavp.c

- Inserting an xavp into a list can crash when inserting XTYPE_NULL padding entries
Hugh Waite 10 жил өмнө
parent
commit
497b6ad2ce
1 өөрчлөгдсөн 1 нэмэгдсэн , 2 устгасан
  1. 1 2
      xavp.c

+ 1 - 2
xavp.c

@@ -723,8 +723,7 @@ int xavp_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list)
 		if(crt==NULL)
 			return -1;
 		if (lst == NULL) {
-			crt->next = *list;
-			*list = crt;
+			xavp_add(crt, list);
 		} else {
 			crt->next = lst->next;
 			lst->next = crt;