From b965d71c36017c5ad67e78a6cb8e300ddbec7bf6 Mon Sep 17 00:00:00 2001 From: dimitri Date: Mon, 2 Jan 2006 21:19:55 +0000 Subject: Fix for potential memory corruption. Note that this is now included in release 1.4.6 if downloaded after 01-01-2006. --- src/util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 78a0c05..bcea278 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,6 +1,6 @@ /***************************************************************************** * - * + * $Id$ * * Copyright (C) 1997-2005 by Dimitri van Heesch. * @@ -811,7 +811,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) //fprintf(stderr,"name().data(),item->name().data(),item->getOuterScope()->name().data()); - QCString key; + QCString key(40); key.sprintf("%p:%p:%p",scope,fileScope,item); static QDict visitedDict; if (visitedDict.find(key)) return -1; // already looked at this @@ -889,7 +889,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope, return isAccessibleFrom(scope,fileScope,item); } - QCString key; + QCString key(40+explicitScopePart.length()); key.sprintf("%p:%p:%p:%s",scope,fileScope,item,explicitScopePart.data()); static QDict visitedDict; if (visitedDict.find(key)) return -1; // already looked at this -- cgit v0.12