[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] System call bindings



Hello,


Selon Olivier Landemarre <olivier.landemarre@utbm.fr>:
> It could looks something like this if I understand:
> if (p->domain == DOM_TOS) copy8_3 (dta->dta_pat, slash);
> ....
> if (p->domain == DOM_TOS) strncpy (dta->dta_name, slash, TOS_NAMELEN-1);
> else strncpy (dta->dta_name, slash, PATH_MAX-1);

You must also adjust DTA structure so it could store PATH_MAX chars.

But this means that any program working in MiNT domain and compiled with an old
osbind.h may crash, since strncpy(..., PATH_MAX-1) may corrupt memory area
below DTA.


Is it really worth the trouble ?


Regards,


Xavier