From 83235c10ec9c93d6c8d41898b083355ace38cf2b Mon Sep 17 00:00:00 2001 From: Christophe Bothamy Date: Wed, 25 Sep 2002 19:24:26 +0000 Subject: [PATCH] - malloc'ed memory was one byte too short --- bochs/osdep.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bochs/osdep.cc b/bochs/osdep.cc index 7af34c35a..2914f3a93 100644 --- a/bochs/osdep.cc +++ b/bochs/osdep.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: osdep.cc,v 1.7 2002-09-23 02:20:51 yakovlev Exp $ +// $Id: osdep.cc,v 1.8 2002-09-25 19:24:26 cbothamy Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -209,7 +209,7 @@ char *bx_strdup(const char *str) { char *temp; - temp = malloc(strlen(str)); + temp = malloc(strlen(str)+1); sprintf(temp, "%s", str); return temp;