From 0ce4a59418937e562b4830b1b0654d0a4887addb Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sat, 10 Sep 2016 20:42:47 +0200 Subject: Reserves less, but enough room when using the old distorm interface. --- disasm/extractfunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'disasm/extractfunction.cpp') diff --git a/disasm/extractfunction.cpp b/disasm/extractfunction.cpp index 1af481e..ce54240 100644 --- a/disasm/extractfunction.cpp +++ b/disasm/extractfunction.cpp @@ -107,7 +107,7 @@ void extract_function(std::string file_path, binparse::Value32 object_id, binpar std::cout << "Function ends at: " << binparse::Offset32(ci.nextOffset) << std::endl; std::vector<_DecodedInst> instructions; - instructions.resize(100000); + instructions.resize(ci.nextOffset - function_offset); unsigned int read_inst; auto result = distorm_decode64( -- cgit v1.2.3-70-g09d2