代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rsyslog 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6aeec7bf83135224400362598f0cc7ebef655195 Mon Sep 17 00:00:00 2001
From: David Buckley <davidbuckley@gambitresearch.com>
Date: Tue, 12 Apr 2022 17:38:49 +0100
Subject: [PATCH] Fix non-null-terminated-string used with strlen
The `failedmsg_entry` expects a null-terminated string in `key`, but
here we allocate with malloc and copy a string-with-length-n into only
the first n bytes. If the final byte is null, this is by coincidence
only.
We've observed this by means of seeing random binary data appended to
keys submitted to kafka apparently at random, and this looks like a
smoking gun.
Conflict:NA
Reference:https://github.com/rsyslog/rsyslog/commit/2c8c9db065cef3b5086c90c3782ac48da40c8b2f
---
plugins/omkafka/omkafka.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/omkafka/omkafka.c b/plugins/omkafka/omkafka.c
index 850dfc0..e6cb2ea 100644
--- a/plugins/omkafka/omkafka.c
+++ b/plugins/omkafka/omkafka.c
@@ -350,6 +350,7 @@ const size_t msglen, const char *const topicname)
return NULL;
}
memcpy(etry->key, key, keylen);
+ etry->key[keylen] = '\0';
} else {
etry->key=NULL;
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。