Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Jul 20, 2021
2 parents f48c22b + dcfb97e commit 2adf5c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libmariadb/win32_errmsg.c
Expand Up @@ -117,7 +117,7 @@ void ma_format_win32_error(char* buf, size_t buflen, DWORD code, _Printf_format_
return;
if (entry)
{
sprintf_s(cur, end - cur, "%s. Error 0x%08lX(%s)", entry->msg, code, entry->sym);
snprintf(cur, end - cur, "%s. Error 0x%08lX(%s)", entry->msg, code, entry->sym);
}
else
{
Expand All @@ -131,7 +131,8 @@ void ma_format_win32_error(char* buf, size_t buflen, DWORD code, _Printf_format_
cur++;
*cur = 0;
}
sprintf_s(cur, end - cur, ". Error %lu/0x%08lX", code, code);
snprintf(cur, end - cur, ". Error %lu/0x%08lX", code, code);
}
end[-1] = 0;
}

0 comments on commit 2adf5c6

Please sign in to comment.