This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Coverity CID #15149: Missing varargs init or cleanup
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 16 Aug 2016 23:15:50 +0000 (19:15 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 17 Aug 2016 00:19:59 +0000 (20:19 -0400)
The return was returning after va_start but before va_end.

perlio.c

index d44c67f..e60f3bb 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -350,11 +350,12 @@ PerlIO_debug(const char *fmt, ...)
 {
     va_list ap;
     dSYS;
-    va_start(ap, fmt);
 
     if (!DEBUG_i_TEST)
         return;
 
+    va_start(ap, fmt);
+
     if (!PL_perlio_debug_fd) {
        if (!TAINTING_get &&
            PerlProc_getuid() == PerlProc_geteuid() &&