Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winlogbeat - fix large message panic for WinXP/2003 #1498

Merged
merged 1 commit into from
Apr 27, 2016

Commits on Apr 26, 2016

  1. Fix panic when reading messages larger than 32K characters on Windows…

    … XP and 2003.
    
    Winlogbeat was passing the size of the buffer to Windows using number of bytes, but Windows was expecting number of TCHAR's. This made Windows return that the number of TCHARs read was greater than the number that the buffer could hold. Winlogbeat used the return value to read from the buffer which caused a 'runtime error: slice bounds out of range' panic.
    
    The buffer length issue has been corrected by dividing by sizeof(TCHAR) which is 2. In addition a check has been added to verify that the return value from Windows is sane before using it to slice the buffer.
    andrewkroh committed Apr 26, 2016
    Configuration menu
    Copy the full SHA
    90a2a90 View commit details
    Browse the repository at this point in the history