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

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


The following commit(s) were added to refs/heads/feature/refactor_bundle_cache 
by this push:
     new f519ba8d Fix incorrect use of asprintf with va_list.
f519ba8d is described below

commit f519ba8d829201db935a60b1c5dd3af6a8b85cf9
Author: PengZheng <[email protected]>
AuthorDate: Tue Feb 21 22:17:15 2023 +0800

    Fix incorrect use of asprintf with va_list.
---
 libs/error_injector/asprintf/src/asprintf_ei.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libs/error_injector/asprintf/src/asprintf_ei.cc 
b/libs/error_injector/asprintf/src/asprintf_ei.cc
index 71381e5b..0c00c31c 100644
--- a/libs/error_injector/asprintf/src/asprintf_ei.cc
+++ b/libs/error_injector/asprintf/src/asprintf_ei.cc
@@ -18,6 +18,7 @@
  */
 
 #include <cstdarg>
+#include <cstdio>
 #include "asprintf_ei.h"
 
 extern "C" {
@@ -28,7 +29,7 @@ int __wrap_asprintf(char** buf, const char* format, ...) {
     CELIX_EI_IMPL(asprintf);
     va_list args;
     va_start(args, format);
-    int rc = __real_asprintf(buf, format, args);
+    int rc = vasprintf(buf, format, args);
     va_end(args);
     return rc;
 }

Reply via email to