The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / bellagio / 0004-segfault-on-removeFromWaitResource.patch
1 We always access globalComponentList[] at indexComponent=-1 which causes a
2 segfault. Use i as the index instead.
3
4 Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
5
6 --- bellagio-0.9.3/src/omx_reference_resource_manager.c.old     2012-03-13 10:15:25.743940980 +0000
7 +++ bellagio-0.9.3/src/omx_reference_resource_manager.c 2012-03-13 10:18:02.201971009 +0000
8 @@ -485,7 +485,6 @@
9  OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp) {
10         omx_base_component_PrivateType* omx_base_component_Private;
11         int i = 0;
12 -       int indexComponent = -1;
13  
14         DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__);
15         omx_base_component_Private = (omx_base_component_PrivateType*)openmaxStandComp->pComponentPrivate;
16 @@ -493,16 +492,13 @@
17         while(listOfcomponentRegistered[i].component_name != NULL ) {
18                 if (!strcmp(listOfcomponentRegistered[i].component_name, omx_base_component_Private->name)) {
19                         // found component in the list of the resource manager
20 -                       removeElemFromList(&globalComponentList[indexComponent], openmaxStandComp);
21 -                       break;
22 +                       removeElemFromList(&globalComponentList[i], openmaxStandComp);
23 +                       DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
24 +                       return OMX_ErrorNone;
25                 }
26                 i++;
27         }
28 -       if (indexComponent <0) {
29 -               // No resource to be handled
30 -               DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__);
31 -               return OMX_ErrorNone;
32 -       }
33 -       DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
34 +       // No resource to be handled
35 +       DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__);
36         return OMX_ErrorNone;
37  }