WellKnownEntry used a const char * to store the name of its entry, but didn't actually copy the passed-in string, only its pointer. Since the entries were all populated via strings off the stack, this led to them being overwritten with random garbage during program execution. In the best case, this would result in well known icons such as the ladybug boot volume failing to resolve. In the worst case, this likely led to random corruption/crashes. Fixed by having them store a BString instead.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37476 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-07-12 02:06:29 +00:00
parent aa5fca06bf
commit 140f3bd884

View File

@ -296,7 +296,7 @@ class WellKnowEntryList {
node_ref node;
directory_which which;
const char *name;
BString name;
};
static directory_which Match(const node_ref *);