Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-03

Cleaning of Dos unit

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi, I wrote a patch that makes some clean of the unit Dos.pp of the Go32v2 version of the FPC 2.0.5. It corrects two buffer exceeding in a string check and conversion. For better understanding in further developement only. Regards, Marco Borsari.

------------------------------------------------------ Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada

Reply by email

Tomas Hajny
to Unknown author

On 10 Mar 07, at 20:00, wrote:

Hi Marco,

Hi, I wrote a patch that makes some clean of the unit Dos.pp of the Go32v2 version of the FPC 2.0.5. It corrects two buffer exceeding in a string check and conversion. For better understanding in further developement only.

I applied your patch in trunk, hoping that you
hadn't overlooked something. ;-) In general, I'm
not sure if this kind of saving 1 byte
dynamically allocated on stack is really worth
the risk of possibly breaking something, because
the 1 byte might have been still needed in some
special case after all (admittedly, I couldn't
find why this should happen, which is the reason
why I applied the patch)...

Tomas

Reply by email

Unknown author
Tomas Hajny wrote 9 lines
I applied your patch in trunk, hoping that you hadn't overlooked something. ;-) In general, I'm not sure if this kind of saving 1 byte dynamically allocated on stack is really worth the risk of possibly breaking something, because the 1 byte might have been still needed in some special case after all (admittedly, I couldn't find why this should happen, which is the reason why I applied the patch)...

It makes possible a strict check in the space of
allocation, let's the string be
#3abc#10#13
when there's no prefix (as in the environement
strings) it needs an exceeding of two characters
nor three. The purpose of the modification is quite purely understanding of the code.

------------------------------------------------------ Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://infostrada.it

Reply by email