Icon View Incident Report

Serious Serious
Reported By: Daniel Humphress
Reported On: 8/8/2011
For: Version 4.30 Build 6
# 3484 Returning String Greater than 512 Characters in a Custom Function with String Data Type Can Cause AV

The following code causes an AV when a memo longer than 255 characters is returned via the custom function.

constructor TTestSQLFunctions.Create( AEngine: TDBISAMEngine );
begin
 inherited Create;
 FEngine := AEngine;
 FServerVersion := '';
 with AEngine do begin
   with Functions.CreateFunction(ftString,'Test').Params do begin
     CreateFunctionParam(ftString);
   end;
   OnCustomFunction := DBISAMEngineCustomFunction;
 end;
end;



Comments Comments and Workarounds
The workaround is to create the custom function with a return type of ftMemo instead of ftString.


Resolution Resolution
Fixed Problem on 8/10/2011 in version 4.30 build 7
Image