summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2020-08-19 11:27:14 +0200
committerLouis Sautier <sbraz@gentoo.org>2020-08-19 12:12:44 +0200
commit1accc08d7cf84c71673452784d8cc274d7f8f5e1 (patch)
treebdbc5478db788a1426efd333fd78f864874f3faf /net-irc/eggdrop/files/eggdrop-1.8.4-fix-array-bounds-warning.patch
parentmedia-sound/scmpc: Fix building with CFLAGS=-fno-common (diff)
downloadgentoo-1accc08d7cf84c71673452784d8cc274d7f8f5e1.tar.gz
gentoo-1accc08d7cf84c71673452784d8cc274d7f8f5e1.tar.bz2
gentoo-1accc08d7cf84c71673452784d8cc274d7f8f5e1.zip
net-irc/eggdrop: respect LDFLAGS, backport array bounds warning fix
Closes: https://bugs.gentoo.org/724948 Package-Manager: Portage-3.0.3, Repoman-2.3.23 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'net-irc/eggdrop/files/eggdrop-1.8.4-fix-array-bounds-warning.patch')
-rw-r--r--net-irc/eggdrop/files/eggdrop-1.8.4-fix-array-bounds-warning.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/net-irc/eggdrop/files/eggdrop-1.8.4-fix-array-bounds-warning.patch b/net-irc/eggdrop/files/eggdrop-1.8.4-fix-array-bounds-warning.patch
new file mode 100644
index 000000000000..7c6c2d6dae69
--- /dev/null
+++ b/net-irc/eggdrop/files/eggdrop-1.8.4-fix-array-bounds-warning.patch
@@ -0,0 +1,24 @@
+diff --git a/src/flags.c b/src/flags.c
+index 8cecd2898..3f0a7ea32 100644
+--- a/src/flags.c
++++ b/src/flags.c
+@@ -403,7 +403,10 @@ void break_down_flags(const char *string, struct flag_record *plus,
+ which = plus;
+ mode++;
+ if ((mode == 2) && !(flags & (FR_CHAN | FR_BOT)))
+- string = "";
++ goto breakout; /* string = ""; does not work here because we need to
++ break out of while() / nested switch(), see
++ "string++;" below and string = "\0"; is worse than
++ goto */
+ else if (mode == 3)
+ mode = 1;
+ break;
+@@ -447,6 +450,7 @@ void break_down_flags(const char *string, struct flag_record *plus,
+ }
+ string++;
+ }
++breakout:
+ for (which = plus; which; which = (which == plus ? minus : 0)) {
+ which->global &=USER_VALID;
+