the problem, brought up by Bret:

during config.sys processing,

    INSTALL= \freedos\MEM.EXE /F

will report ~24 K used at 99f0:0

however the kernel will crash if memory below this is overwritten.

source for the bug:


CONFIG.C, DoInstall() sets up a memory arena, and releases memory
below the INIT CODE segment, based on the assumption that 'normal' code
is no longer needed. this is *almost* true.

unfortunately

   STATIC void kernel()
   {
     CommandTail Cmd;

     strcpy(master_env, "PATH=.");
     fmemcpy(MK_FP(DOS_PSP + 8, 0), master_env, sizeof(master_env));

     memset(Cmd.ctBuffer, 0, sizeof(Cmd.ctBuffer));
     strcpy(Cmd.ctBuffer, Config.cfgInitTail);



will use strcpy() and memset(), located at CS:11ee and freed by
DoInstall, and potentially overwritten.


probably the easiest solution: write some quick

   init_memcpy() ...

to be used at *this* location by Kernel().

I'm away for a week; will continue work when back.




Tom




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to