Add missing va_end() to prevent stack corruptions
Added va_end() for copied variable arguments lists
in __vfprintf() and __find_arguments().
This is by C standard.
Important for systems which pass arguments in registers.
Change-Id: I7ac42beaa6645bfe856c18132253352dae29ea37
diff --git a/libc/stdio/vfprintf.c b/libc/stdio/vfprintf.c
index dac8496..83e69ef 100644
--- a/libc/stdio/vfprintf.c
+++ b/libc/stdio/vfprintf.c
@@ -827,6 +827,7 @@
munmap(argtable, argtablesiz);
argtable = NULL;
}
+ va_end(orgap);
return (__sferror(fp) ? EOF : ret);
/* NOTREACHED */
}