aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorLiu.andrew.x@gmail.com <Liu.andrew.x@gmail.com>2015-08-13 20:13:55 +0000
committerLiu.andrew.x@gmail.com <Liu.andrew.x@gmail.com>2015-08-13 20:13:55 +0000
commit8794e39888a71c5dff5161d928229b872db5ffce (patch)
tree037edbcac18a2b887498efc22a470b565191e44b /src/processor
parentActually remove removed files (diff)
downloadbreakpad-8794e39888a71c5dff5161d928229b872db5ffce.tar.xz
Fix format specifier in proc maps to support 32-bit architectures.
R=ivanpe@chromium.org Review URL: https://codereview.chromium.org/1288323003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1486 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/proc_maps_linux.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/processor/proc_maps_linux.cc b/src/processor/proc_maps_linux.cc
index 1954cc86..3ba767f3 100644
--- a/src/processor/proc_maps_linux.cc
+++ b/src/processor/proc_maps_linux.cc
@@ -61,10 +61,10 @@ bool ParseProcMaps(const std::string& input,
// The final %n term captures the offset in the input string, which is used
// to determine the path name. It *does not* increment the return value.
// Refer to man 3 sscanf for details.
- if (sscanf(line, "%lx-%lx %4c %lx %hhx:%hhx %ld %n",
- &region.start, &region.end, permissions, &region.offset,
- &region.major_device, &region.minor_device, &region.inode,
- &path_index) < 7) {
+ if (sscanf(line, "%" SCNx64 "-%" SCNx64 " %4c %" SCNx64" %hhx:%hhx %"
+ SCNd64 " %n", &region.start, &region.end, permissions,
+ &region.offset, &region.major_device, &region.minor_device,
+ &region.inode, &path_index) < 7) {
BPLOG(ERROR) << "sscanf failed for line: " << line;
return false;
}