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

Unified Diff: src/shared/Communication.cpp

Issue 5163581322559488: Issue 1283 - wrong usage of memset, fix sizeof, make proper initializing (Closed)
Patch Set: Created Oct. 8, 2014, 2:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginSystem.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/Communication.cpp
===================================================================
--- a/src/shared/Communication.cpp
+++ b/src/shared/Communication.cpp
@@ -211,7 +211,7 @@
if (mode == MODE_CREATE)
{
SECURITY_ATTRIBUTES securityAttributes = {};
- securityAttributes.nLength = sizeof(securityAttributes);
+ securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES);
securityAttributes.bInheritHandle = TRUE;
std::tr1::shared_ptr<SECURITY_DESCRIPTOR> sharedSecurityDescriptor; // Just to simplify cleanup
@@ -265,7 +265,7 @@
Communication::InputBuffer Communication::Pipe::ReadMessage()
{
std::stringstream stream;
- std::unique_ptr<char[]> buffer(new char[bufferSize]);
+ std::auto_ptr<char> buffer(new char[bufferSize]);
bool doneReading = false;
while (!doneReading)
{
« no previous file with comments | « src/plugin/PluginSystem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld