From 8567dc6685368bb642b0cb93b83bfc60c32438e9 Mon Sep 17 00:00:00 2001 From: SashaXser <24498484+SashaXser@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:50:01 +0400 Subject: [PATCH] Update goodbyedpi.c --- src/goodbyedpi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/goodbyedpi.c b/src/goodbyedpi.c index cfab950..865d04e 100644 --- a/src/goodbyedpi.c +++ b/src/goodbyedpi.c @@ -222,18 +222,17 @@ static void add_maxpayloadsize_str(unsigned short maxpayload) { static void finalize_filter_strings() { - char *tmpstr; + char *newstr, *newstr2; - tmpstr = strdup(filter_string); - str_replace(tmpstr, IPID_TEMPLATE, ""); - str_replace(tmpstr, MAXPAYLOADSIZE_TEMPLATE, ""); + newstr2 = repl_str(filter_string, IPID_TEMPLATE, ""); + newstr = repl_str(newstr2, MAXPAYLOADSIZE_TEMPLATE, ""); free(filter_string); - filter_string = tmpstr; + free(newstr2); + filter_string = newstr; - tmpstr = strdup(filter_passive_string); - str_replace(tmpstr, IPID_TEMPLATE, ""); + newstr = repl_str(filter_passive_string, IPID_TEMPLATE, ""); free(filter_passive_string); - filter_passive_string = tmpstr; + filter_passive_string = newstr; } static char* dumb_memmem(const char* haystack, unsigned int hlen,