From aec44489da7da17b5babd9343850257558741fa2 Mon Sep 17 00:00:00 2001 From: mmentovai Date: Fri, 30 Mar 2007 20:30:08 +0000 Subject: vswprintf causes Purify to fail (#145). r=darin http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/88e18d9fac4eee22 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@135 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/windows/pdb_source_line_writer.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/common/windows/pdb_source_line_writer.cc') diff --git a/src/common/windows/pdb_source_line_writer.cc b/src/common/windows/pdb_source_line_writer.cc index 071940d6..9f4ae4b5 100644 --- a/src/common/windows/pdb_source_line_writer.cc +++ b/src/common/windows/pdb_source_line_writer.cc @@ -723,9 +723,10 @@ bool PDBSourceLineWriter::GetModuleInfo(PDBModuleInfo *info) { // Use the same format that the MS symbol server uses in filesystem // hierarchies. wchar_t age_string[9]; - WindowsStringUtils::safe_swprintf( - age_string, sizeof(age_string) / sizeof(age_string[0]), - L"%x", age); + swprintf(age_string, sizeof(age_string) / sizeof(age_string[0]), + L"%x", age); + GB_WSU_SAFE_SWPRINTF_TERMINATE(age_string, + sizeof(age_string) / sizeof(age_string[0])); info->debug_identifier = GUIDString::GUIDToSymbolServerWString(&guid); info->debug_identifier.append(age_string); @@ -738,10 +739,12 @@ bool PDBSourceLineWriter::GetModuleInfo(PDBModuleInfo *info) { // Use the same format that the MS symbol server uses in filesystem // hierarchies. wchar_t identifier_string[17]; - WindowsStringUtils::safe_swprintf( - identifier_string, - sizeof(identifier_string) / sizeof(identifier_string[0]), - L"%08X%x", signature, age); + swprintf(identifier_string, + sizeof(identifier_string) / sizeof(identifier_string[0]), + L"%08X%x", signature, age); + GB_WSU_SAFE_SWPRINTF_TERMINATE(identifier_string, + sizeof(identifier_string) / + sizeof(identifier_string[0])); info->debug_identifier = identifier_string; } -- cgit v1.2.1