Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: sandbox/win/sandbox_poc/pocdll/handles.cc

Issue 552663004: win: Don't use precision with %wZ, it's ignored. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/win/sandbox_poc/pocdll/exports.h" 5 #include "sandbox/win/sandbox_poc/pocdll/exports.h"
6 #include "sandbox/win/sandbox_poc/pocdll/utils.h" 6 #include "sandbox/win/sandbox_poc/pocdll/utils.h"
7 #include "sandbox/win/tools/finder/ntundoc.h" 7 #include "sandbox/win/tools/finder/ntundoc.h"
8 8
9 // This file contains the tests used to verify the security of handles in 9 // This file contains the tests used to verify the security of handles in
10 // the process 10 // the process
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 } 147 }
148 } 148 }
149 149
150 if (file_name) { 150 if (file_name) {
151 UNICODE_STRING file_name_string; 151 UNICODE_STRING file_name_string;
152 file_name_string.Buffer = file_name->FileName; 152 file_name_string.Buffer = file_name->FileName;
153 file_name_string.Length = (USHORT)file_name->FileNameLength; 153 file_name_string.Length = (USHORT)file_name->FileNameLength;
154 file_name_string.MaximumLength = (USHORT)file_name->FileNameLength; 154 file_name_string.MaximumLength = (USHORT)file_name->FileNameLength;
155 fprintf(output, "[GRANTED] Handle 0x%4.4X Access: 0x%8.8lX " 155 fprintf(output, "[GRANTED] Handle 0x%4.4X Access: 0x%8.8lX "
156 "Type: %-13.13wZ Path: %wZ\r\n", 156 "Type: %-13wZ Path: %wZ\r\n",
157 h, 157 h,
158 system_handles->Information[i].GrantedAccess, 158 system_handles->Information[i].GrantedAccess,
159 type ? &type->TypeName : NULL, 159 type ? &type->TypeName : NULL,
160 &file_name_string); 160 &file_name_string);
161 } else { 161 } else {
162 fprintf(output, "[GRANTED] Handle 0x%4.4X Access: 0x%8.8lX " 162 fprintf(output, "[GRANTED] Handle 0x%4.4X Access: 0x%8.8lX "
163 "Type: %-13.13wZ Path: %wZ\r\n", 163 "Type: %-13wZ Path: %wZ\r\n",
164 h, 164 h,
165 system_handles->Information[i].GrantedAccess, 165 system_handles->Information[i].GrantedAccess,
166 type ? &type->TypeName : NULL, 166 type ? &type->TypeName : NULL,
167 name ? &name->ObjectName : NULL); 167 name ? &name->ObjectName : NULL);
168 } 168 }
169 169
170 if (type) { 170 if (type) {
171 delete[] type; 171 delete[] type;
172 } 172 }
173 173
174 if (file_name) { 174 if (file_name) {
175 delete[] file_name; 175 delete[] file_name;
176 } 176 }
177 177
178 if (name) { 178 if (name) {
179 delete [] name; 179 delete [] name;
180 } 180 }
181 } 181 }
182 182
183 if (system_handles) { 183 if (system_handles) {
184 delete [] system_handles; 184 delete [] system_handles;
185 } 185 }
186 } 186 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698