diff mbox series

[meta-oe,blacksail,95/95] safec: upgrade 3.9.1 -> 3.9.2

Message ID 20261203111406.4182597-95-ankur.tyagi85@gmail.com
State New
Headers show
Series [meta-gnome,blacksail,1/95] eog: upgrade 50.3 -> 50.4 | expand

Commit Message

Ankur Tyagi Dec. 3, 2026, 11:14 a.m. UTC
From: Ankur Tyagi <ankur.tyagi85@gmail.com>

Dropped patch that is part of the upstream version

Changelog:
https://github.com/rurban/safeclib/blob/v3.9.2/ChangeLog

Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
 ...snprintf_s-Increase-Buffer-Size-by-1.patch | 41 -------------------
 .../safec/{safec_3.9.1.bb => safec_3.9.2.bb}  |  3 +-
 2 files changed, 1 insertion(+), 43 deletions(-)
 delete mode 100644 meta-oe/recipes-core/safec/safec/0001-vsnprintf_s-Increase-Buffer-Size-by-1.patch
 rename meta-oe/recipes-core/safec/{safec_3.9.1.bb => safec_3.9.2.bb} (86%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/safec/safec/0001-vsnprintf_s-Increase-Buffer-Size-by-1.patch b/meta-oe/recipes-core/safec/safec/0001-vsnprintf_s-Increase-Buffer-Size-by-1.patch
deleted file mode 100644
index 5617aeb368..0000000000
--- a/meta-oe/recipes-core/safec/safec/0001-vsnprintf_s-Increase-Buffer-Size-by-1.patch
+++ /dev/null
@@ -1,41 +0,0 @@ 
-From dca9a17c75c7442060c08fdced4e4b0c8d2babae Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Aug 2025 20:23:48 -0700
-Subject: [PATCH] vsnprintf_s: Increase Buffer Size by 1
-
-It is a buffer overflow warning that GCC 15.2 is catching.
-The issue is that it's trying to write to `buf[len++]` when len could
-potentially be 31, which would write to buf[31] in a buffer of size 32
-(valid indices 0-31), but the len++ post-increment means it could
-theoretically write beyond the buffer bounds.
-
-Fixes
-
-../../sources/safec-3.9.1/src/str/vsnprintf_s.c: In function 'safec_ftoa.isra':
-../../sources/safec-3.9.1/src/str/vsnprintf_s.c:523:24: error: writing 32 bytes into a region of size 31 [-Werror=stringop-overflow=]
-  523 |             buf[len++] = '0';
-      |             ~~~~~~~~~~~^~~~~
-../../sources/safec-3.9.1/src/str/vsnprintf_s.c:394:10: note: at offset [1, 32] into destination object 'buf' of size 32
-  394 |     char buf[PRINTF_FTOA_BUFFER_SIZE];
-      |          ^~~
-cc1: all warnings being treated as errors
-
-Upstream-Status: Submitted [https://github.com/rurban/safeclib/pull/148]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/str/vsnprintf_s.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/str/vsnprintf_s.c b/src/str/vsnprintf_s.c
-index fa53ab42..0b62c3cb 100644
---- a/src/str/vsnprintf_s.c
-+++ b/src/str/vsnprintf_s.c
-@@ -391,7 +391,7 @@ static size_t safec_ftoa(out_fct_type out, const char *funcname, char *buffer,
-                          size_t idx, size_t maxlen, double value,
-                          unsigned int prec, unsigned int width,
-                          unsigned int flags) {
--    char buf[PRINTF_FTOA_BUFFER_SIZE];
-+    char buf[PRINTF_FTOA_BUFFER_SIZE + 1]; // Add extra byte for safety
-     size_t len = 0U, off = 0U;
-     double tmp;
-     double diff = 0.0;
diff --git a/meta-oe/recipes-core/safec/safec_3.9.1.bb b/meta-oe/recipes-core/safec/safec_3.9.2.bb
similarity index 86%
rename from meta-oe/recipes-core/safec/safec_3.9.1.bb
rename to meta-oe/recipes-core/safec/safec_3.9.2.bb
index 72e13efa8e..ceb429737d 100644
--- a/meta-oe/recipes-core/safec/safec_3.9.1.bb
+++ b/meta-oe/recipes-core/safec/safec_3.9.2.bb
@@ -6,9 +6,8 @@  SECTION = "lib"
 
 inherit autotools pkgconfig
 
-SRCREV = "39a0a819f80853498e48a6e601a446a122b64aaa"
+SRCREV = "bf847fd89f2e3399f2df75d8cd4d8cfe27c135bf"
 SRC_URI = "git://github.com/rurban/safeclib.git;branch=master;protocol=https;tag=v${PV} \
-           file://0001-vsnprintf_s-Increase-Buffer-Size-by-1.patch \
 		  "
 # arm-yoe-linux-gnueabi-clang: error: argument unused during compilation: '-mretpoline' [-Werror,-Wunused-command-line-argument]
 # arm-yoe-linux-gnueabi-clang: error: argument unused during compilation: '-fstack-clash-protection' [-Werror,-Wunused-command-line-argument]