#51 SCI_GETTEXT(0,buf) access violation

Bug
closed-fixed
Scintilla (792)
1
2002-07-05
2002-07-04
No

If one asks for zero bytes of text using SCI_GETTEXT
then Scintilla writes off the end of the buffer, corrupting
memory.

The cause of the error is fairly obviously the loop in
Editor::WndProc which loops from 0 to (wParam - 1)
using an unsigned loop counter. If wParam is zero, then
(wParam-1) is a very large unsigned integer value.

I suppose it is pointless asking for zero bytes of text,
but if writing generic routines one otherwise needs to
treat as a special case.

Discussion

  • Blair McGlashan

    Blair McGlashan - 2002-07-04
    • priority: 5 --> 1
     
  • Neil Hodgson

    Neil Hodgson - 2002-07-05
    • assigned_to: nobody --> nyamatongwe
    • status: open --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2002-07-05

    Logged In: YES
    user_id=12579

    Fixed in CVS.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks