mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
minifi-cpp: patch spdlog CVE-2025-6140
Same patch as in spdlog recipe. Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
parent
ce5314a8d8
commit
3d969d3a4a
@ -0,0 +1,46 @@
|
||||
From 10320184df1eb4638e253a34b1eb44ce78954094 Mon Sep 17 00:00:00 2001
|
||||
From: Gabi Melman <gmelman1@gmail.com>
|
||||
Date: Mon, 17 Mar 2025 15:46:31 +0200
|
||||
Subject: [PATCH] Fixed issue #3360 (#3361)
|
||||
|
||||
CVE: CVE-2025-6140
|
||||
Upstream-Status: Backport [https://github.com/gabime/spdlog/commit/10320184df1eb4638e253a34b1eb44ce78954094]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
include/spdlog/pattern_formatter-inl.h | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h
|
||||
index b53d8051..fd408ed5 100644
|
||||
--- a/include/spdlog/pattern_formatter-inl.h
|
||||
+++ b/include/spdlog/pattern_formatter-inl.h
|
||||
@@ -70,6 +70,9 @@ public:
|
||||
pad_it(remaining_pad_);
|
||||
} else if (padinfo_.truncate_) {
|
||||
long new_size = static_cast<long>(dest_.size()) + remaining_pad_;
|
||||
+ if (new_size < 0) {
|
||||
+ new_size = 0;
|
||||
+ }
|
||||
dest_.resize(static_cast<size_t>(new_size));
|
||||
}
|
||||
}
|
||||
@@ -264,7 +267,7 @@ public:
|
||||
: flag_formatter(padinfo) {}
|
||||
|
||||
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
|
||||
- const size_t field_size = 10;
|
||||
+ const size_t field_size = 8;
|
||||
ScopedPadder p(field_size, padinfo_, dest);
|
||||
|
||||
fmt_helper::pad2(tm_time.tm_mon + 1, dest);
|
||||
@@ -926,9 +929,8 @@ private:
|
||||
memory_buf_t cached_datetime_;
|
||||
|
||||
#ifndef SPDLOG_NO_TLS
|
||||
- mdc_formatter<null_scoped_padder> mdc_formatter_{padding_info{}};
|
||||
+ mdc_formatter<null_scoped_padder> mdc_formatter_{padding_info {}};
|
||||
#endif
|
||||
-
|
||||
};
|
||||
|
||||
} // namespace details
|
||||
@ -28,6 +28,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;protocol=https;branch=mai
|
||||
file://0007-libsodium-aarch64-set-compiler-attributes-after-including-arm_.patch \
|
||||
file://systemd-volatile.conf \
|
||||
file://sysvinit-volatile.conf \
|
||||
file://CVE-2025-6140.patch;patchdir=${S}/thirdparty/spdlog-src \
|
||||
"
|
||||
|
||||
# minifi-cpp: 0.99.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user