From 3e76b4a74bf31859086d0ad220bd088895b1b524 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Wed, 26 Feb 2014 18:59:48 +0000 Subject: [PATCH] Initialize file descriptors to -1, not 0, in MachoWalker. R=ivan.penkov@gmail.com Review URL: https://breakpad.appspot.com/1174002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1284 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/mac/macho_walker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc index b2948b71..eee27d64 100644 --- a/src/common/mac/macho_walker.cc +++ b/src/common/mac/macho_walker.cc @@ -51,7 +51,7 @@ namespace MacFileUtilities { MachoWalker::MachoWalker(const char *path, LoadCommandCallback callback, void *context) - : file_(0), + : file_(-1), memory_(NULL), memory_size_(0), callback_(callback), @@ -64,7 +64,7 @@ MachoWalker::MachoWalker(const char *path, LoadCommandCallback callback, MachoWalker::MachoWalker(void *memory, size_t size, LoadCommandCallback callback, void *context) - : file_(0), + : file_(-1), memory_(memory), memory_size_(size), callback_(callback),