* fhandler_clipboard.cc (fhandler_dev_clipboard::read): Fix buffer
read access overrun when pos > 0.
This commit is contained in:
parent
f4ddbb8ebf
commit
42c8e85109
|
@ -1,3 +1,8 @@
|
|||
2013-06-17 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_clipboard.cc (fhandler_dev_clipboard::read): Fix buffer
|
||||
read access overrun when pos > 0.
|
||||
|
||||
2013-06-17 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* times.cc (GetSystemTimePreciseAsFileTime): Add comment to declaration.
|
||||
|
|
|
@ -295,7 +295,8 @@ fhandler_dev_clipboard::read (void *ptr, size_t& len)
|
|||
!= (size_t) -1
|
||||
&& (ret > conv_len
|
||||
/* Skip separated high surrogate: */
|
||||
|| ((buf [pos + glen - 1] & 0xFC00) == 0xD800 && glen - pos > 1)))
|
||||
|| ((buf [glen - 1] & 0xFC00) == 0xD800
|
||||
&& glen - pos > 1)))
|
||||
--glen;
|
||||
if (ret == (size_t) -1)
|
||||
ret = 0;
|
||||
|
|
|
@ -8,3 +8,6 @@ Bug fixes:
|
|||
- Fix long-standing problem which allows to access files via ".." using an
|
||||
invalid POSIX path, for instance, `cd nonexistant/../existing_dir".
|
||||
Fixes: http://cygwin.com/ml/cygwin/2013-05/msg00222.html
|
||||
|
||||
- Fix EFAULT when reading large clipboard.
|
||||
Fixes: http://cygwin.com/ml/cygwin/2013-06/msg00311.html
|
||||
|
|
Loading…
Reference in New Issue