View Issue Details

IDProjectCategoryView StatusLast Update
0005958JEDI VCL00 JVCL Componentspublic2012-09-10 14:15
ReporterblakeAssigned ToAHUser 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.45 
Target VersionFixed in Version3.46 
Summary0005958: Strings longer than 255 characters cause exception
DescriptionThe DrawTextInRect method allocates a 256-byte array for a string, but doesn't check the string length. If the szStr is set to a larger value, the function works acceptably for larger strings.

  procedure DrawTextInRect(Rect: TRect; Align: Word; StrListNum: Integer);
  var
    FontColor: TColor;
    szStr: array[0..255] of Char;
    Len: Word;
    TextStyle: TglTextStyle;
  begin
    Dec(Rect.Right, 2);
    // FillMemory(@szStr,255,0);
    if StrListNum = -1 then
      StrPCopy(szStr, Items[Index])
    else
      StrPCopy(szStr, Buttons[StrListNum - 1]);
TagsNo tags attached.

Activities

AHUser

2012-08-19 10:18

developer   ~0020118

Fixed in svn revision 13400.

Issue History

Date Modified Username Field Change
2012-08-18 08:26 blake New Issue
2012-08-19 10:18 AHUser Note Added: 0020118
2012-08-19 10:18 AHUser Status new => resolved
2012-08-19 10:18 AHUser Fixed in Version => Daily / SVN
2012-08-19 10:18 AHUser Resolution open => fixed
2012-08-19 10:18 AHUser Assigned To => AHUser
2012-09-10 14:15 obones Fixed in Version Daily / SVN => 3.46