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

Fix for int21h, ah=65h // GET NLS DATA #114

Open
jossk opened this issue Jan 24, 2025 · 0 comments
Open

Fix for int21h, ah=65h // GET NLS DATA #114

jossk opened this issue Jan 24, 2025 · 0 comments

Comments

@jossk
Copy link

jossk commented Jan 24, 2025

The int21h handler for func 65h do not check input buffer size :(

Quick fix for subfunc al=1 :

    case 1:
    {
        if (cpuGetCX() >= 41) {
            static const uint8_t data[] = {1, 38, 0, 1, 0, 181, 1};
            putmem(addr, data, 7);
            putmem(addr + 7, nls_country_info, 34);
            cpuSetCX(41);
        } else {
            dos_error = 1;
            cpuSetAX(dos_error);
            cpuSetFlag(cpuFlag_CF);
        }
        break;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant