From: Arnaud Giersch Date: Fri, 4 Oct 2013 22:15:03 +0000 (+0200) Subject: Need one more byte for the terminating \0. X-Git-Tag: v3_9_90~39^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6b1b21e2faceffa5587879806a1c0748c508a8ed?ds=sidebyside Need one more byte for the terminating \0. --- diff --git a/src/xbt/xbt_sha.c b/src/xbt/xbt_sha.c index 34026b15c4..d03cd8932c 100644 --- a/src/xbt/xbt_sha.c +++ b/src/xbt/xbt_sha.c @@ -6,7 +6,7 @@ */ /* Later adapted to fit into SimGrid. Distributed under LGPL v2.1, Feb 1999.*/ -/* Copyright (c) 2008-2012. The SimGrid Team. +/* Copyright (c) 2008-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -99,7 +99,7 @@ static void xbt_sha_finalize(xbt_sha_t sha) /** @brief returns the sha hash into a newly allocated buffer (+ reset sha object) */ char *xbt_sha_read(xbt_sha_t sha) { - char *res = xbt_malloc(40); + char *res = xbt_malloc(41); xbt_sha_print(sha, res); return res; }