diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-09-28 18:14:48 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-09-28 18:14:48 +0000 |
commit | 68004c84d6b852cfd4096cd211d2f8d3ff1d9f48 (patch) | |
tree | 84eae19b2fa516d9075a54a3e28e9af6f7b5adc5 /src/common/solaris/file_id.cc | |
parent | Fix compiler warning C4245: signed/unsigned mismatch when converting between (diff) | |
download | breakpad-68004c84d6b852cfd4096cd211d2f8d3ff1d9f48.tar.xz |
Solaris version of symbol dumper (#207). Patch by Alfred Peng. r=me
http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/e4cbdbf7ddaf7f51
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@218 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/solaris/file_id.cc')
-rw-r--r-- | src/common/solaris/file_id.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/common/solaris/file_id.cc b/src/common/solaris/file_id.cc index 4bec3ed8..92e7f71f 100644 --- a/src/common/solaris/file_id.cc +++ b/src/common/solaris/file_id.cc @@ -36,8 +36,6 @@ #include <elf.h> #include <fcntl.h> #include <gelf.h> -#include <gnutls/openssl.h> -#include <link.h> #include <sys/mman.h> #include <sys/ksyms.h> #include <stdio.h> @@ -47,6 +45,7 @@ #include <cassert> #include <cstdio> +#include "common/md5.h" #include "common/solaris/file_id.h" #include "common/solaris/message_output.h" #include "google_breakpad/common/minidump_format.h" @@ -130,7 +129,7 @@ static bool FindElfTextSection(int fd, const void *elf_base, } FileID::FileID(const char *path) { - strncpy(path_, path, strlen(path)); + strcpy(path_, path); } class AutoCloser { @@ -160,10 +159,10 @@ bool FileID::ElfFileIdentifier(unsigned char identifier[16]) { int text_size = 0; if (FindElfTextSection(fd, base, &text_section, &text_size)) { - MD5_CTX md5; - MD5_Init(&md5); - MD5_Update(&md5, text_section, text_size); - MD5_Final(identifier, &md5); + MD5Context md5; + MD5Init(&md5); + MD5Update(&md5, (const unsigned char *)text_section, text_size); + MD5Final(identifier, &md5); success = true; } |