hresult: create enough space for the hresult_errstr message.
authorGünther Deschner <gd@samba.org>
Mon, 22 Aug 2016 12:21:25 +0000 (14:21 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 22 Aug 2016 23:06:24 +0000 (01:06 +0200)
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/util/hresult.c
source4/scripting/bin/gen_hresult.py

index 1b3a8f2b690e543c78d0b6b4d9bb0f8597c99445..327d97b7c1e0e922dcb06326c17aadcda38ed0f3 100644 (file)
@@ -14688,7 +14688,7 @@ const char *hresult_errstr_const(HRESULT err_code)
 
 const char *hresult_errstr(HRESULT err_code)
 {
-       static char msg[20];
+       static char msg[22];
        int i;
 
        for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {
index d49aef9a0b4769c1a94b0ae9181b4e0a605894c6..cdc9142e56bf37e3e356fc5452630371fe91dbde 100755 (executable)
@@ -186,7 +186,7 @@ def generateSourceFile(out_file):
     out_file.write("\n")
     out_file.write("const char *hresult_errstr(HRESULT err_code)\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("\n")
     out_file.write("   for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {\n")