From bd7b42587c3585575ff55517046977a4d98ae303 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Mon, 2 Jul 2007 12:02:36 +0000 Subject: [PATCH] Issue 191 - Linux dump_syms produces bad line numbers for some functions (16 bit overflow). r=Liu Li git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@190 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/dump_symbols.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index 5c2d6254..8c211579 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -223,7 +223,8 @@ int LoadLineInfo(struct nlist *list, struct LineInfo line; while (cur_list < list_end && cur_list->n_type == N_SLINE) { line.rva_to_func = cur_list->n_value; - line.line_num = cur_list->n_desc; + // n_desc is a signed short + line.line_num = (unsigned short)cur_list->n_desc; func_info->line_info.push_back(line); ++cur_list; }