]> wimlib.net Git - wimlib/blobdiff - src/util.c
wimlib_vmsg(): Use correct error string buffer length
[wimlib] / src / util.c
index b2e59e40417c3a4a555770a0d6d462f632466e6a..2d151478164f247bca678f6583d7ae71a86550fa 100644 (file)
@@ -162,9 +162,9 @@ wimlib_vmsg(const tchar *tag, const tchar *format,
                tfputs(tag, stderr);
                wimlib_vfprintf(stderr, format, va);
                if (perror && errno_save != 0) {
-                       tchar buf[50];
+                       tchar buf[64];
                        int res;
-                       res = tstrerror_r(errno_save, buf, sizeof(buf));
+                       res = tstrerror_r(errno_save, buf, ARRAY_LEN(buf));
                        if (res) {
                                tsprintf(buf,
                                         T("unknown error (errno=%d)"),