openbsd-ports/x11/wxWidgets/patches/patch-src_iodbc_info_c
todd b25888b419 wxWidgets 2.4.2, C++ cross-platform GUI toolkit
www: http://www.wxwidgets.org/

from Andrew Dalgleish   < openbsd at ajd dot net dot au >
many thanks for much persistence!
2004-07-16 21:01:35 +00:00

33 lines
875 B
Plaintext

$OpenBSD: patch-src_iodbc_info_c,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- src/iodbc/info.c.orig Fri Jan 28 09:47:49 2000
+++ src/iodbc/info.c Wed Apr 30 10:04:17 2003
@@ -192,7 +192,7 @@ SQLDataSources (
/*
* Copy DSN information
*/
- STRNCPY (szDSN, sect[cur_entry], cbDSNMax);
+ strlcpy (szDSN, sect[cur_entry], cbDSNMax);
/*
glt??? pcbDSN = strlen(szDSN);
*/
@@ -309,8 +309,7 @@ SQLGetInfo (
retcode = SQL_SUCCESS_WITH_INFO;
}
- STRNCPY (rgbInfoValue, buf, len);
- ((char FAR *) rgbInfoValue)[len] = '\0';
+ strlcpy (rgbInfoValue, buf, len);
}
if (pcbInfoValue != NULL)
@@ -421,8 +420,7 @@ SQLGetInfo (
PUSHSQLERR (pdbc->herr, en_01004);
}
- STRNCPY (rgbInfoValue, buf, len);
- ((char FAR *) rgbInfoValue)[len] = '\0';
+ strlcpy (rgbInfoValue, buf, len);
}
if (pcbInfoValue != NULL)