Skip to content

Commit

Permalink
Only allocate a larger buffer for smaller buffers; odbc driver can re…
Browse files Browse the repository at this point in the history
…turn a huge size that's not actually the size
  • Loading branch information
d3x0r committed Jul 22, 2024
1 parent 21bdea3 commit ab0dfc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SQLlib/sqlstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3766,7 +3766,7 @@ int __GetSQLResult( PODBC odbc, PCOLLECT collection, int bMore )
, NULL // decimal digits short int
, NULL // nullable ptr ?
);
if( colsize != 0xFFFFFFFF ) {
if( colsize < 0xFFFFFF ) {
colsize = (colsize * 2) + 1;
if( colsize >= sizeof( collection->byResultStatic ) )
{
Expand Down

0 comments on commit ab0dfc0

Please sign in to comment.