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

[MiNT] intin size of VDI gemlib


I'm looking to fix a issue with gemlib using it under some USERDEF with some system with low supervisor stack.

To be able to be safe threaded gemlib use for VDI stack for the intin table, some functions use the maximum size (2Ko) like v_gtext(), second problem there is no string size limitation copy and in theory it is possible gemlib could write outside of the intin table.

I propose to reduce size of the table to 1Ko (around 500 char string max) with copy limitation to this size. I think it's enough. An other solution if size is longer than 500 char work with a buffer of 2Ko but it could crash under USERDEF (I don't think this case exist!) or a second solution is to allocate dynamically a buffer in this case with Malloc().
Notice for original VDI lib of PureC limit is at 132 char max!