diff options
author | nyamatongwe <unknown> | 2011-04-16 13:53:00 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-04-16 13:53:00 +1000 |
commit | d6f98958d5c32e19a7924883a4bf8cc4fad4282e (patch) | |
tree | a8bb1a0c81bd28544f1cbd19564bcb42f2d15da0 | |
parent | 0adca4ad14500910cca14a54d7d4c19e740606da (diff) | |
download | scintilla-mirror-d6f98958d5c32e19a7924883a4bf8cc4fad4282e.tar.gz |
Avoid bad text measurement with very long pieces of text. Bug #3286637.
-rw-r--r-- | win32/PlatWin.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index c9bb433e4..ec6c3e383 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -11,6 +11,7 @@ #include <stdarg.h> #include <stdio.h> #include <time.h> +#include <limits.h> #undef _WIN32_WINNT #define _WIN32_WINNT 0x0500 @@ -441,7 +442,7 @@ SurfaceImpl::SurfaceImpl() : bitmap(0), bitmapOld(0), paletteOld(0) { // Windows 9x has only a 16 bit coordinate system so break after 30000 pixels - maxWidthMeasure = IsNT() ? 1000000 : 30000; + maxWidthMeasure = IsNT() ? INT_MAX : 30000; // There appears to be a 16 bit string length limit in GDI on NT and a limit of // 8192 characters on Windows 95. maxLenText = IsNT() ? 65535 : 8192; |