mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 03:39:28 +02:00
+ Fixed mem-corruption
git-svn-id: trunk@4315 -
This commit is contained in:
parent
c603e817e7
commit
0454bc7717
@ -218,7 +218,7 @@ begin
|
||||
if (not assigned(param)) or param.IsNull then Result := 'Null'
|
||||
else if param.DataType = ftString then
|
||||
begin
|
||||
Getmem(esc_str,sizeof(param.asstring)*2+1);
|
||||
Getmem(esc_str,length(param.asstring)*2+1);
|
||||
mysql_real_escape_string(FMySQL,esc_str,pchar(param.asstring),length(param.asstring));
|
||||
Result := '''' + esc_str + '''';
|
||||
Freemem(esc_str);
|
||||
|
Loading…
Reference in New Issue
Block a user