Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/plugin/AdblockPlusClient.cpp

Issue 5163581322559488: Issue 1283 - wrong usage of memset, fix sizeof, make proper initializing (Closed)
Left Patch Set: Created Oct. 8, 2014, 2:49 p.m.
Right Patch Set: remove intializating call Created Oct. 13, 2014, 9:47 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/plugin/NotificationMessage.cpp » ('j') | src/plugin/PluginClass.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 #include "PluginSettings.h" 2 #include "PluginSettings.h"
3 #include "PluginSystem.h" 3 #include "PluginSystem.h"
4 #include "PluginFilter.h" 4 #include "PluginFilter.h"
5 #include "PluginClientFactory.h" 5 #include "PluginClientFactory.h"
6 #include "PluginMutex.h" 6 #include "PluginMutex.h"
7 #include "PluginClass.h" 7 #include "PluginClass.h"
8 8
9 #include "AdblockPlusClient.h" 9 #include "AdblockPlusClient.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 PSID integritySid = 0; 58 PSID integritySid = 0;
59 ConvertStringSidToSid(L"S-1-16-4096", &integritySid); 59 ConvertStringSidToSid(L"S-1-16-4096", &integritySid);
60 std::tr1::shared_ptr<SID> sharedIntegritySid(static_cast<SID*>(integritySi d), FreeSid); // Just to simplify cleanup 60 std::tr1::shared_ptr<SID> sharedIntegritySid(static_cast<SID*>(integritySi d), FreeSid); // Just to simplify cleanup
61 61
62 TOKEN_MANDATORY_LABEL tml = {}; 62 TOKEN_MANDATORY_LABEL tml = {};
63 tml.Label.Attributes = SE_GROUP_INTEGRITY; 63 tml.Label.Attributes = SE_GROUP_INTEGRITY;
64 tml.Label.Sid = integritySid; 64 tml.Label.Sid = integritySid;
65 65
66 // Set the process integrity level 66 // Set the process integrity level
67 SetTokenInformation(newToken, TokenIntegrityLevel, &tml, sizeof(TOKEN_MAND ATORY_LABEL) + GetLengthSid(integritySid)); 67 SetTokenInformation(newToken, TokenIntegrityLevel, &tml, sizeof(tml));
68 68
69 STARTUPINFO startupInfo = {}; 69 STARTUPINFO startupInfo = {};
70 PROCESS_INFORMATION processInformation = {}; 70 PROCESS_INFORMATION processInformation = {};
71 71
72 createProcRes = CreateProcessAsUserW(newToken, engineExecutablePath.c_str( ), params.GetBuffer(params.GetLength() + 1), 72 createProcRes = CreateProcessAsUserW(newToken, engineExecutablePath.c_str( ), params.GetBuffer(params.GetLength() + 1),
73 0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo, &processInformation); 73 0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo, &processInformation);
74 } 74 }
75 75
76 if (!createProcRes) 76 if (!createProcRes)
77 { 77 {
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 DEBUG_GENERAL("CompareVersions"); 570 DEBUG_GENERAL("CompareVersions");
571 Communication::OutputBuffer request; 571 Communication::OutputBuffer request;
572 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2); 572 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2);
573 Communication::InputBuffer response; 573 Communication::InputBuffer response;
574 if (!CallEngine(request, response)) 574 if (!CallEngine(request, response))
575 return 0; 575 return 0;
576 int result; 576 int result;
577 response >> result; 577 response >> result;
578 return result; 578 return result;
579 } 579 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld