samhocevar / rinetd

📡 TCP/UDP port redirector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

realloc size error

shiftwinting opened this issue · comments

before:
allRules = (Rule *) realloc(allRules, sizeof(Rule *) * (allRulesCount + 1));
Rule * is pointer, size: int

after:
allRules = (Rule *) realloc(allRules, sizeof(Rule) * (allRulesCount + 1));

Good catch! Thanks.