aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch')
-rw-r--r--meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch b/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch
new file mode 100644
index 0000000000..5b9315cfb4
--- /dev/null
+++ b/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch
@@ -0,0 +1,28 @@
+From 9de23a9199d26e64ab6b5be2bb74f260200b2dc5 Mon Sep 17 00:00:00 2001
+From: matt335672 <30179339+matt335672@users.noreply.github.com>
+Date: Fri, 21 Aug 2020 12:20:31 +0100
+Subject: [PATCH] Fixed compiler warnings about snprintf truncations
+
+Upstream-Status: Backport [https://github.com/neutrinolabs/xrdp/pull/1659]
+---
+ common/log.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/common/log.c b/common/log.c
+index 4a0bd2f3..8686789d 100644
+--- a/common/log.c
++++ b/common/log.c
+@@ -555,9 +555,7 @@ log_message(const enum logLevels lvl, const char *msg, ...)
+ now_t = time(&now_t);
+ now = localtime(&now_t);
+
+- snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
+- now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
+- now->tm_sec);
++ strftime(buff, 21, "[%Y%m%d-%H:%M:%S] ", now);
+
+ internal_log_lvl2str(lvl, buff + 20);
+
+--
+2.29.2
+