commit | 38bc49563782ee1cb91660e58acf1afe1a31020a | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Nov 10 17:10:51 2016 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Nov 10 17:10:51 2016 +0100 |
tree | 072db1fda78c0de4086bd718fe9656d864b7d978 | |
parent | c4d4ac22f78fb1394c79eccc8a1e6812c0c7d8a7 [diff] [blame] |
patch 8.0.0072 Problem: MS-Windows: Crash with long font name. (Henry Hu) Solution: Fix comparing with LF_FACESIZE. (Ken Takata, closes #1243)
diff --git a/src/os_mswin.c b/src/os_mswin.c index 625fdcc..dc55389 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c
@@ -2893,7 +2893,7 @@ */ for (p = name; *p && *p != ':'; p++) { - if (p - name + 1 > LF_FACESIZE) + if (p - name + 1 >= LF_FACESIZE) goto theend; /* Name too long */ lf->lfFaceName[p - name] = *p; }