From 9af956da144bd8e191c47e59b9469172a44ab8f0 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 29 May 2013 23:07:58 +0200 Subject: [PATCH] rpmfunctions.c: add mutex around rpmEVRparse --- src/rpmfunctions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rpmfunctions.c b/src/rpmfunctions.c index d249874..99675ae 100644 --- a/src/rpmfunctions.c +++ b/src/rpmfunctions.c @@ -69,8 +69,10 @@ unsigned int checkVersionWithFlags(const char* cmp1, uint_32 flags, const char* struct EVR_s evr1, evr2; int vercmp = 0; + sem_wait(&rpm_mutex); rpmEVRparse(cmp1, &evr1); rpmEVRparse(cmp2, &evr2); + sem_post(&rpm_mutex); if (strlen(evr1.F[RPMEVR_E]) && strlen(evr2.F[RPMEVR_E])) vercmp=rpmvercmp(evr1.F[RPMEVR_E], evr2.F[RPMEVR_E]); else if (strlen(evr2.F[RPMEVR_E])) vercmp = -1;