summaryrefslogtreecommitdiffstats
path: root/external/libetonyek/0001-allow-0-size-message.patch.1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/libetonyek/0001-allow-0-size-message.patch.1
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/libetonyek/0001-allow-0-size-message.patch.1')
-rw-r--r--external/libetonyek/0001-allow-0-size-message.patch.130
1 files changed, 30 insertions, 0 deletions
diff --git a/external/libetonyek/0001-allow-0-size-message.patch.1 b/external/libetonyek/0001-allow-0-size-message.patch.1
new file mode 100644
index 0000000000..62e584b815
--- /dev/null
+++ b/external/libetonyek/0001-allow-0-size-message.patch.1
@@ -0,0 +1,30 @@
+From 54762245feee35ce6885f7443da8f8443fccd5b5 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Wed, 26 May 2021 20:39:41 +0200
+Subject: [PATCH] allow 0-size message
+
+It likely means the input is broken, but there is no need to reject it.
+Let's just produce a dummy, empty message.
+
+Change-Id: I03a1e9827f21f6a0ce69d7e16dfcf2e9a0f2d44f
+---
+ src/lib/IWAMessage.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/IWAMessage.cpp b/src/lib/IWAMessage.cpp
+index c01b1b6..9456444 100644
+--- a/src/lib/IWAMessage.cpp
++++ b/src/lib/IWAMessage.cpp
+@@ -42,7 +42,8 @@ IWAMessage::IWAMessage(const RVNGInputStreamPtr_t &input, unsigned long length)
+ : m_input(input)
+ , m_fields()
+ {
+- assert(length > 0);
++ if (length == 0)
++ return;
+
+ parse(length);
+ }
+--
+2.31.1
+