From 2c782c13824708ebc01b8b5a171583b112c743b5 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 10 Feb 2004 06:03:59 +0000 Subject: [PATCH] * fix for webbug 2870 --- fv/stddlg.pas | 4 +++- fvision/stddlg.pas | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fv/stddlg.pas b/fv/stddlg.pas index 405ac12959..555dcd9014 100644 --- a/fv/stddlg.pas +++ b/fv/stddlg.pas @@ -1156,8 +1156,10 @@ begin Path := PFileDialog(Owner)^.Directory^ else Path := ''; Path := FExpand(Path+PFileDialog(Owner)^.WildCard); + { avoid B Buffer overflow PM } + Path := ShrinkPath(Path, Size.X - 1); Color := GetColor($01); - MoveChar(B, ' ', Color, Size.X * Size.Y); { fill with empty spaces } + MoveChar(B, ' ', Color, Size.X); { fill with empty spaces } WriteLine(0, 0, Size.X, Size.Y, B); MoveStr(B[1], Path, Color); WriteLine(0, 0, Size.X, 1, B); diff --git a/fvision/stddlg.pas b/fvision/stddlg.pas index 405ac12959..555dcd9014 100644 --- a/fvision/stddlg.pas +++ b/fvision/stddlg.pas @@ -1156,8 +1156,10 @@ begin Path := PFileDialog(Owner)^.Directory^ else Path := ''; Path := FExpand(Path+PFileDialog(Owner)^.WildCard); + { avoid B Buffer overflow PM } + Path := ShrinkPath(Path, Size.X - 1); Color := GetColor($01); - MoveChar(B, ' ', Color, Size.X * Size.Y); { fill with empty spaces } + MoveChar(B, ' ', Color, Size.X); { fill with empty spaces } WriteLine(0, 0, Size.X, Size.Y, B); MoveStr(B[1], Path, Color); WriteLine(0, 0, Size.X, 1, B);