freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] [ freetds-Patches-753288 ] Fix: int cast-and-deref in ODBC error.c.
- From: "SourceForge.net" <noreply AT sourceforge.net>
- To: noreply AT sourceforge.net
- Cc:
- Subject: [freetds] [ freetds-Patches-753288 ] Fix: int cast-and-deref in ODBC error.c.
- Date: Thu, 12 Jun 2003 06:50:24 -0700
Patches item #753288, was opened at 2003-06-12 13:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=753288&group_id=33106
Category: odbc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gerhard Esterhuizen (gmpff)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix: int cast-and-deref in ODBC error.c.
Initial Comment:
In the nightly sources from 12/06/2003,
/src/odbc/error.c, line 404 we have:
*(SQLINTEGER *) buffer = *(SQLINTEGER *)
tsock->res_info->row_count;
This is a bug as tsock->res_info->row_count is a
TDS_INT containing the number of result rows and should
therefore not be cast to a pointer and dereferenced.
This causes segfaults when executing queries (using
SQLExecute) that returned no results (resulting in a
NULL pointer being dereferenced).
I fixed this by changing the line to:
*(SQLINTEGER *) buffer = tsock->res_info->row_count;
A patch against nightly source 12062003 is attached.
Regards,
gerhard.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=753288&group_id=33106
-
[freetds] [ freetds-Patches-753288 ] Fix: int cast-and-deref in ODBC error.c.,
SourceForge.net, 06/12/2003
- <Possible follow-up(s)>
- [freetds] [ freetds-Patches-753288 ] Fix: int cast-and-deref in ODBC error.c., SourceForge.net, 06/12/2003
- [freetds] [ freetds-Patches-753288 ] Fix: int cast-and-deref in ODBC error.c., SourceForge.net, 06/12/2003
Archive powered by MHonArc 2.6.24.