possible bug waiting to happen

In this forum all bug reports concerning the 6.x branch will be gahtered. You have the possibility to track the bug fix process.

Moderators: EgonHugeist, mdaems

CharlesMcAllister
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 25.10.2006, 19:25

possible bug waiting to happen

Postby CharlesMcAllister » 29.10.2006, 03:57

Something I noticed might become a bug in Zeos.
There is an uninitialized variable in TZInterbase6Statement.ExecuteQuery...

[syntax="delphi"]
function TZInterbase6Statement.ExecuteQuery(const SQL: string): IZResultSet;
var
Cursor: string;
begin
// Cursor is not initialized
...
if CursorName <> '' then
begin
Cursor := CursorName;
GetPlainDriver.isc_dsql_set_cursor_name(@FStatusVector,
@StmtHandle, PChar(Cursor), 0);
CheckInterbase6Error(SQL);
end;

// cursor could have garbage in it

LastResultSet := GetCachedResultSet(SQL, Self,
TZInterbase6ResultSet.Create(Self, SQL, StmtHandle, Cursor,
SQLData, nil, FCachedBlob));
...
end;
[/syntax]

CharlesMcAllister
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 25.10.2006, 19:25

Postby CharlesMcAllister » 31.10.2006, 13:01

In case i'm not making myself clear, the bug will show up in LastResultSet, as it could potentially have a garbage cursor name.

I haven't yet had a need to look at this cursor value, so I haven't come across a particular bug, but thought I would pass this on anyway.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest