From 991746b6050ab00fe0ee28f0027dee2067eba684 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 14 Apr 2014 09:44:11 +0400 Subject: [PATCH] crypt32: Fix properties list lookup (Coverity). --- dlls/crypt32/proplist.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/proplist.c b/dlls/crypt32/proplist.c index be9bf8d3ea7..d849fd60495 100644 --- a/dlls/crypt32/proplist.c +++ b/dlls/crypt32/proplist.c @@ -175,12 +175,15 @@ DWORD ContextPropertyList_EnumPropIDs(CONTEXT_PROPERTY_LIST *list, DWORD id) EnterCriticalSection(&list->cs); if (id) { - CONTEXT_PROPERTY *cursor = NULL; + CONTEXT_PROPERTY *cursor = NULL, *prop; - LIST_FOR_EACH_ENTRY(cursor, &list->properties, CONTEXT_PROPERTY, entry) + LIST_FOR_EACH_ENTRY(prop, &list->properties, CONTEXT_PROPERTY, entry) { - if (cursor->propID == id) + if (prop->propID == id) + { + cursor = prop; break; + } } if (cursor) {