Skip to content

Commit 8bf7033

Browse files
committed
odbc: Fix for SQL_COPT_SS_OLDPWD attribute
This attribute allows to change the password while logging to the server. Code was wrongly taking the length of the attribute in characters instead of bytes causing a failure using wide function. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
1 parent 5212de1 commit 8bf7033

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dnl ------------------------------------------------------------
1111
# ------------------------------------------------------------
1212
# Initialization
1313
# ------------------------------------------------------------
14-
AC_INIT(FreeTDS, 1.5.9)
14+
AC_INIT(FreeTDS, 1.5.10)
1515
AC_CONFIG_SRCDIR(src/dblib/dblib.c)
1616
AC_PREREQ(2.53)
1717

src/odbc/odbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6556,7 +6556,7 @@ ODBC_FUNC(SQLSetConnectAttr, (P(SQLHDBC,hdbc), P(SQLINTEGER,Attribute), P(SQLPOI
65566556
odbc_errs_add(&dbc->errs, "HY090", NULL);
65576557
break;
65586558
}
6559-
if (!odbc_dstr_copy(dbc, &dbc->oldpwd, StringLength, (ODBC_CHAR *) ValuePtr))
6559+
if (!odbc_dstr_copy_oct(dbc, &dbc->oldpwd, StringLength, (ODBC_CHAR *) ValuePtr))
65606560
odbc_errs_add(&dbc->errs, "HY001", NULL);
65616561
else
65626562
dbc->use_oldpwd = 1;

0 commit comments

Comments
 (0)