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

Fixed stack memory corruption due to strcat() function #21

Merged
merged 6 commits into from
Mar 18, 2024

Commits on Mar 17, 2024

  1. Fixed memory corruption due to strcat() function

    - The problem with memory stack corruption occurred in the 'fetch_saveimagepath()' function when starting the emulator.
    Because the memory allocated on the stack `TCHAR path[MAX_DPATH]` in function `DISK_get_default_saveimagepath` does not have a end of line marker ('/0').
    That's why further call of the strcat() function which first searches for a zero byte and then adds another string to it resulted in stack corruption in this place and application crash as a consequence.
    - In other similar functions, the same scenario is possible.
    dartfnm committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    08b2966 View commit details
    Browse the repository at this point in the history
  2. Update dummy.cpp

    Compilation error, I forgot to specify the variable name
    dartfnm authored Mar 17, 2024
    Configuration menu
    Copy the full SHA
    337ec06 View commit details
    Browse the repository at this point in the history
  3. Fixed memory corruption due to strcat() function

    - The problem with memory stack corruption occurred in the 'fetch_saveimagepath()' function when starting the emulator.
    Because the memory allocated on the stack `TCHAR path[MAX_DPATH]` in function `DISK_get_default_saveimagepath` does not have a end of line marker ('/0').
    That's why further call of the strcat() function which first searches for a zero byte and then adds another string to it resulted in stack corruption in this place and application crash as a consequence.
    - In other similar functions, the same scenario is possible.
    dartfnm committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    cf5d50f View commit details
    Browse the repository at this point in the history
  4. Fix crash if host processor doesn't support 'movbe' SSE3 extension

    - My Intel processor 2011 does not support SSE3 extensions, in particular 'movbe' instruction. As a result, the emulator crashes with the error 'illegal instruction'
    Therefore, I would recommend leaving the original #ifdef HAVE_MOVBE
    dartfnm committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    832b809 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3d7ada2 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. Configuration menu
    Copy the full SHA
    6eee30b View commit details
    Browse the repository at this point in the history