From aceadc36900e9c2baebb8ad8426921c341ab35e1 Mon Sep 17 00:00:00 2001 From: uglymotha Date: Fri, 6 Dec 2024 14:46:11 +0000 Subject: [PATCH] Fix incorrect sprintf --- src/igmpv3proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/igmpv3proxy.c b/src/igmpv3proxy.c index 246318b..4be4f6b 100644 --- a/src/igmpv3proxy.c +++ b/src/igmpv3proxy.c @@ -117,7 +117,7 @@ int main(int ArgCn, char *ArgVc[]) { if (strlen(optarg) > 0) { if (c == 'r' && !parseSubnetAddress(optarg, &addr, &mask)) { i = optind, j = optind = 1; - if (! (opts[1] = malloc(strlen(optarg) + 1))) { // Freed by Self + if (! (opts[1] = malloc(strlen(optarg) + 2))) { // Freed by Self fprintf(stderr, "Out of Memory!"); exit(-1); }