This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/update_github_actions
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/update_github_actions 
by this push:
     new c30112ba Fix illegal stack access by `va_copy`.
c30112ba is described below

commit c30112bafd658e7b96e23e03bdd959f7021768fe
Author: PengZheng <[email protected]>
AuthorDate: Thu Jan 19 21:11:29 2023 +0800

    Fix illegal stack access by `va_copy`.
---
 .github/workflows/macos.yml                                          | 1 -
 .../log_writers/syslog_writer/src/celix_syslog_writer_activator.c    | 5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 3d7b6a65..df76b708 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -9,7 +9,6 @@ on:
 jobs:
 
   build-conan:
-    if: false #See #471
     runs-on: macos-10.15
     timeout-minutes: 120
     steps:
diff --git 
a/bundles/logging/log_writers/syslog_writer/src/celix_syslog_writer_activator.c 
b/bundles/logging/log_writers/syslog_writer/src/celix_syslog_writer_activator.c
index f3359ea6..726e3764 100644
--- 
a/bundles/logging/log_writers/syslog_writer/src/celix_syslog_writer_activator.c
+++ 
b/bundles/logging/log_writers/syslog_writer/src/celix_syslog_writer_activator.c
@@ -58,7 +58,10 @@ static void celix_syslogWriter_sinkLog(void *handle 
__attribute__((unused)), cel
     }
 
     char buffer[1024];
-    size_t needed = vsnprintf(buffer, 1024, format, formatArgs);
+    va_list argCopy;
+    va_copy(argCopy, formatArgs);
+    size_t needed = vsnprintf(buffer, 1024, format, argCopy);
+    va_end(argCopy);
     if (needed > 1024) {
         char *allocatedBuffer = NULL;
         vasprintf(&allocatedBuffer, format, formatArgs);

Reply via email to