mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-18 16:20:31 +01:00
Fix potential reading/writing 1 byte behind it's own buffer in PLY loader.
Thanks @wolfgang for report and patch (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52627&p=305573#p305573) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6113 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
2d67c2d92c
commit
49b39e456d
@ -1,5 +1,7 @@
|
|||||||
--------------------------
|
--------------------------
|
||||||
Changes in 1.9 (not yet released)
|
Changes in 1.9 (not yet released)
|
||||||
|
- Fix potential reading/writing 1 byte behind it's own buffer in PLY loader.
|
||||||
|
Thanks @wolfgang for report and patch (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52627&p=305573#p305573)
|
||||||
- ICursorControl::isVisible is now always returning the flag set in setVisible.
|
- ICursorControl::isVisible is now always returning the flag set in setVisible.
|
||||||
This changes the behaviour on Win32 somewhat when Windows returned a CURSOR_SUPPRESSED state (touch-screen input).
|
This changes the behaviour on Win32 somewhat when Windows returned a CURSOR_SUPPRESSED state (touch-screen input).
|
||||||
Previously we set IsVisible it to false when CURSOR_SUPPRESSED was set.
|
Previously we set IsVisible it to false when CURSOR_SUPPRESSED was set.
|
||||||
|
@ -572,7 +572,7 @@ c8* CPLYMeshFileLoader::getNextLine()
|
|||||||
StartPointer = LineEndPointer + 1;
|
StartPointer = LineEndPointer + 1;
|
||||||
|
|
||||||
// crlf split across buffer move
|
// crlf split across buffer move
|
||||||
if (*StartPointer == '\n')
|
if (StartPointer<EndPointer && *StartPointer == '\n')
|
||||||
{
|
{
|
||||||
*StartPointer = '\0';
|
*StartPointer = '\0';
|
||||||
++StartPointer;
|
++StartPointer;
|
||||||
@ -583,7 +583,7 @@ c8* CPLYMeshFileLoader::getNextLine()
|
|||||||
while (pos < EndPointer && *pos && *pos != '\r' && *pos != '\n')
|
while (pos < EndPointer && *pos && *pos != '\r' && *pos != '\n')
|
||||||
++pos;
|
++pos;
|
||||||
|
|
||||||
if ( pos < EndPointer && ( *(pos+1) == '\r' || *(pos+1) == '\n') )
|
if ( (pos+1) < EndPointer && ( *(pos+1) == '\r' || *(pos+1) == '\n') )
|
||||||
{
|
{
|
||||||
*pos = '\0';
|
*pos = '\0';
|
||||||
++pos;
|
++pos;
|
||||||
|
Loading…
Reference in New Issue
Block a user