diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-07-05 19:31:59 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-07-05 19:31:59 +0000 |
commit | 8408a209cded9d54ab1505bad6bdf49b02f0f27d (patch) | |
tree | d12bd7aae39846502f057706620efd5a01ac55fb | |
parent | issue 194: reviewed by waylonis (diff) | |
download | breakpad-8408a209cded9d54ab1505bad6bdf49b02f0f27d.tar.xz |
issue 151 - Crash when processing file names less than 4 bytes. r=me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@196 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/processor/simple_symbol_supplier.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/processor/simple_symbol_supplier.cc b/src/processor/simple_symbol_supplier.cc index 62800013..ca3805ce 100644 --- a/src/processor/simple_symbol_supplier.cc +++ b/src/processor/simple_symbol_supplier.cc @@ -110,8 +110,9 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath( // name ends in .pdb, strip the .pdb. Otherwise, add .sym to the non-.pdb // name. path.append("/"); - string debug_file_extension = - debug_file_name.substr(debug_file_name.size() - 4); + string debug_file_extension; + if (debug_file_name.size() > 4) + debug_file_extension = debug_file_name.substr(debug_file_name.size() - 4); transform(debug_file_extension.begin(), debug_file_extension.end(), debug_file_extension.begin(), tolower); if (debug_file_extension == ".pdb") { |