samhocevar / rinetd

📡 TCP/UDP port redirector
GNU General Public License v2.0
859 stars 184 forks source link

realloc size error #11

Closed shiftwinting closed 7 years ago

shiftwinting commented 7 years ago

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

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

samhocevar commented 7 years ago

Good catch! Thanks.