All pastes #1821972 Raw Edit

Untitled

public diff v1 · immutable
#1821972 ·published 2010-03-03 22:32 UTC
rendered paste body
From 28ddae8fb780fc201177d0dc5409ce79eb341669 Mon Sep 17 00:00:00 2001From: Andrei Karas <akaras@inbox.ru>Date: Thu, 4 Mar 2010 00:22:29 +0200Subject: [PATCH] Fix possible memory corruption.--- src/utils/xml.cpp |    2 +- 1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/src/utils/xml.cpp b/src/utils/xml.cppindex 76d9f85..341f34c 100644--- a/src/utils/xml.cpp+++ b/src/utils/xml.cpp@@ -52,7 +52,7 @@ namespace XML                 size = file.tellg();                 file.seekg(0, std::ios::beg); -                data = new char[size];+                data = (char*) malloc(size);                  file.read(data, size);                 file.close();-- 1.7.0