summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-03 22:17:52 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-03 22:17:52 +0000
commitcd648264d00177867a58ed5794dc0e9631e40f23 (patch)
tree2fb5383e51b67af07352fe0239726bbb54e36782 /src
parentac608adcdf5f568566ed4fa3d5f0925a10047998 (diff)
fix for the PLUGININFOEX size check
git-svn-id: http://svn.miranda-ng.org/main/trunk@746 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/modules/plugins/newplugins.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 6c142d852e..035b2e4c63 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -186,20 +186,13 @@ static const TCHAR* expiredModulesToSkip[] =
static int checkPI(BASIC_PLUGIN_INFO* bpi, PLUGININFOEX* pi)
{
- int bHasValidInfo = FALSE;
-
if (pi == NULL)
return FALSE;
- if (bpi->InfoEx) {
- if (pi->cbSize == sizeof(PLUGININFOEX))
- if ( !validInterfaceList(bpi->Interfaces) || isPluginBanned(pi->uuid, pi->version))
- return FALSE;
-
- bHasValidInfo = TRUE;
- }
+ if (bpi->InfoEx == NULL || pi->cbSize != sizeof(PLUGININFOEX))
+ return FALSE;
- if ( !bHasValidInfo)
+ if ( !validInterfaceList(bpi->Interfaces) || isPluginBanned(pi->uuid, pi->version))
return FALSE;
if (pi->shortName == NULL || pi->description == NULL || pi->author == NULL ||