1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

hresult: create enough space for the hresult_errstr message.

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Günther Deschner 2016-08-22 14:21:25 +02:00 committed by Jeremy Allison
parent beb99b8061
commit 9c5cd9922b
2 changed files with 2 additions and 2 deletions

View File

@ -14688,7 +14688,7 @@ const char *hresult_errstr_const(HRESULT err_code)
const char *hresult_errstr(HRESULT err_code) const char *hresult_errstr(HRESULT err_code)
{ {
static char msg[20]; static char msg[22];
int i; int i;
for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) { for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {

View File

@ -186,7 +186,7 @@ def generateSourceFile(out_file):
out_file.write("\n") out_file.write("\n")
out_file.write("const char *hresult_errstr(HRESULT err_code)\n") out_file.write("const char *hresult_errstr(HRESULT err_code)\n")
out_file.write("{\n"); out_file.write("{\n");
out_file.write(" static char msg[20];\n") out_file.write(" static char msg[22];\n")
out_file.write(" int i;\n") out_file.write(" int i;\n")
out_file.write("\n") out_file.write("\n")
out_file.write(" for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {\n") out_file.write(" for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {\n")