mirror of
https://github.com/samhocevar/rinetd.git
synced 2025-03-22 15:50:08 +08:00
Fix a memory corruption in the configuration file parsing. Fixes: #11.
This commit is contained in:
parent
96d60bcabb
commit
8feb3e0513
2
rinetd.c
2
rinetd.c
@ -291,7 +291,7 @@ static void readConfiguration(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
allRules = (Rule *)
|
allRules = (Rule *)
|
||||||
realloc(allRules, sizeof(Rule *) * (allRulesCount + 1));
|
realloc(allRules, sizeof(Rule) * (allRulesCount + 1));
|
||||||
if (!allRules) {
|
if (!allRules) {
|
||||||
goto lowMemory;
|
goto lowMemory;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user