misc.c open_pathfmt fix yellow

Change-Id: Id844825726654a3a5b19a1672cb66af9aadaed32
This commit is contained in:
William Wilgus 2022-11-20 00:00:40 -05:00
parent e7e20fab1b
commit da2eaf3bf7

View file

@ -1423,6 +1423,7 @@ int open_pathfmt(int oflag, const char *pathfmt, ...)
{
static char buf[MAX_PATH];
va_list ap;
va_start(ap, pathfmt);
vsnprintf(buf, sizeof(buf), pathfmt, ap);
va_end(ap);
return open(buf, oflag, 0666);