30.03.2014 14:03, Andrew Bird пишет:
> Hi Stas, Bart,
> Firstly, sorry if you already saw this on linux-msdos list, I didn't
> realise this list existed but I'll only post here from now on.
> Here are some patches I made against today's devel branch. I had no
> specific bug to fix, but just wanted to fix some minor bounds checks
> and initialisation issues. If you appreciate what I am trying to do
> I'll spend some more time looking for others.
>
> All compile successfully, but I have very few DOS programs to exercise
> Dosemu properly. Any standalone memory exerciser programs for XMS, EMS
> or DPMI would be helpful?
Thanks for the patches!
I applied the ones that look obvious.
I would prefer the patches in bts, one per ticket.
There is a concern that in an ML the patches are
better reviewed. This is true but bts also sends the
notification e-mails, so whoever is interested in
doing a review, can as well subscribe there I think.
> - if (handle_info[handle].active != 1)
> + if (!emm_valid_handle(handle))
> return (FALSE);
Please double check that this is valid.
For instance, .active can be set to 0xff, which means
non-freeable handle.
> - if ((handle < 0) || (handle >= MAX_HANDLES) || \
> - (handle_info[handle].active == 0)) { \
> + if ((handle < 0) || (handle >= MAX_HANDLES)) { \
> + E_printf("Invalid Handle handle=%x\n", handle); \
> + SETHIGH(&(state->eax), EMM_INV_HAN); \
> + return; \
> + } \
> + if (handle_info[handle].active == 0) { \
I don't think this fixes something.
The .active check will trigger only if both first
conditions evaluate to false, unless I forgot all of the
C programming.
> - memcheck_reserve('U', addr_start, size);
>
> umb = umb_find_unused();
> + if (umb == UMB_NULL) {
I haven't looked closely, but isn't this an assert condition?
------------------------------------------------------------------------------
_______________________________________________
Dosemu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dosemu-devel