summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-networking/recipes-daemons
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons')
-rw-r--r--meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch39
-rw-r--r--meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb1
-rw-r--r--meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb (renamed from meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb)4
3 files changed, 42 insertions, 2 deletions
diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch
new file mode 100644
index 000000000..01e1da870
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch
@@ -0,0 +1,39 @@
+Replace strncpy with memcpy
+
+since the length of data to
+be copied has already been determined with strlen(). Replace strncpy()
+with memcpy() to address the warning and optimize the code a little.
+
+| ippool_config.c:112:2: note: 'snprintf' output between 8 and 55 bytes into a destination of size 48
+| 112 | snprintf(prompt, sizeof(prompt), "ippool-%s", server_name);
+| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/cli/cli_readline.c
++++ b/cli/cli_readline.c
+@@ -257,10 +257,15 @@ static void cli_rl_display_wrapped_text(
+ int pos;
+ int in_ws;
+ int i;
++ int bufsize = sizeof(text_buf)/sizeof(text_buf[0]);
+
+ if (left_margin == 0) {
+ left_margin = 3;
+ }
++ if (left_margin > bufsize) {
++ left_margin = bufsize;
++ }
++
+ if (right_margin == 0) {
+ right_margin = 78;;
+ }
+@@ -271,7 +276,7 @@ static void cli_rl_display_wrapped_text(
+ /* First copy the text heading to the buffer and add a "-", accounting for
+ * the specified left margin.
+ */
+- strncpy(&text_buf[0], text1, left_margin - 3);
++ memcpy(&text_buf[0], text1, left_margin - 3);
+ for (pos = strlen(text1); pos < left_margin - 3; pos++) {
+ text_buf[pos] = ' ';
+ }
diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
index 6fa46904b..3554e688a 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
+++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -26,6 +26,7 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$
file://0003-cli-Mark-return-of-strtol-as-long-int.patch \
file://0002-link-with-libtirpc.patch \
file://0003-musl-fixes.patch \
+ file://strncpy-truncation.patch \
"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"
diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb
index efa2bf5eb..a7eb4c849 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb
+++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb
@@ -27,8 +27,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
file://0001-Add-configure-time-check-for-gettid-API.patch \
file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
"
-SRC_URI[md5sum] = "e9ae9de803a99b7ab33757a49858542f"
-SRC_URI[sha256sum] = "caed672d03ab1fe3f27d333429c7ca03022714e7c6350500208b7bd7349f03ce"
+SRC_URI[md5sum] = "9b61df01d1a092101c4a626692edae19"
+SRC_URI[sha256sum] = "6da9af96e8ee58d11031d305bf4804a00deb6108e12e422722882a2091bd34bd"
inherit autotools useradd systemd pkgconfig