Module: wine Branch: master Commit: 991746b6050ab00fe0ee28f0027dee2067eba684 URL: http://source.winehq.org/git/wine.git/?a=commit;h=991746b6050ab00fe0ee28f002...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Apr 14 09:44:11 2014 +0400
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 be9bf8d..d849fd6 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) {