LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File firebird-2.5.2-isqlwidth.patch of Package firebird (Project openSUSE:Factory)

From: mkubecek <mkubecek@de594faa-8d1b-4a0c-9a6a-a7de5f8bf859>
Date: Tue, 29 May 2012 20:19:58 +0000
Subject: isql: fix buffer overflow when 'set width' sets bigger width than column's natural size

git-svn-id: https://firebird.svn.sourceforge.net/svnroot/firebird/firebird/trunk@54566 de594faa-8d1b-4a0c-9a6a-a7de5f8bf859
---
 src/isql/isql.epp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/isql/isql.epp b/src/isql/isql.epp
index 4930ccf..8e071d8 100644
--- a/src/isql/isql.epp
+++ b/src/isql/isql.epp
@@ -8637,6 +8637,7 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, SLONG buffer[], int pad[
 		{
 			if (!global_Cols.find(var->aliasname, &pad[i]) && global_Col_default)
 				pad[i] = global_Col_default;
+			disp_length = pad[i];
 		}
 
 		if ((type == SQL_TEXT || type == SQL_VARYING) && var->sqlsubtype == 4)
-- 
1.7.7