mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
avoid stack overflow
This commit is contained in:
parent
4c287f20b3
commit
99bb50d2c0
2 changed files with 9 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2024-11-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Tools/AGSIndex: (-makeRefs:) process child nodes in loop rather
|
||||||
|
than recursively ... reduces the depth of recursion to the depth of
|
||||||
|
nesting children rather than the number of children, avoiding stack
|
||||||
|
overflow for large projects.
|
||||||
|
|
||||||
2024-11-21 Richard Frith-Macdonald <rfm@gnu.org>
|
2024-11-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* NSRegularExpression: avoid leaks in ICU code by calling more
|
* NSRegularExpression: avoid leaks in ICU code by calling more
|
||||||
|
|
|
@ -291,7 +291,6 @@ findKey(id refs, NSString *key, NSMutableArray *path, NSMutableArray *found)
|
||||||
- (void) makeRefs: (GSXMLNode*)node
|
- (void) makeRefs: (GSXMLNode*)node
|
||||||
{
|
{
|
||||||
GSXMLNode *children = [node firstChild];
|
GSXMLNode *children = [node firstChild];
|
||||||
GSXMLNode *next = [node next];
|
|
||||||
BOOL newUnit = NO;
|
BOOL newUnit = NO;
|
||||||
|
|
||||||
if ([node type] == XML_ELEMENT_NODE)
|
if ([node type] == XML_ELEMENT_NODE)
|
||||||
|
@ -541,9 +540,10 @@ findKey(id refs, NSString *key, NSMutableArray *path, NSMutableArray *found)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (children != nil)
|
while (children)
|
||||||
{
|
{
|
||||||
[self makeRefs: children];
|
[self makeRefs: children];
|
||||||
|
children = [children next];
|
||||||
}
|
}
|
||||||
if (newUnit == YES)
|
if (newUnit == YES)
|
||||||
{
|
{
|
||||||
|
@ -551,10 +551,6 @@ findKey(id refs, NSString *key, NSMutableArray *path, NSMutableArray *found)
|
||||||
category = nil;
|
category = nil;
|
||||||
classname = nil;
|
classname = nil;
|
||||||
}
|
}
|
||||||
if (next != nil)
|
|
||||||
{
|
|
||||||
[self makeRefs: next];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue