File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Original file line number Diff line number Diff line change @@ -1050,7 +1050,7 @@ static PyObject *cxoConnection_getVersion(cxoConnection *conn, void *unused)
1050
1050
{
1051
1051
dpiVersionInfo versionInfo ;
1052
1052
char buffer [25 ];
1053
- int status ;
1053
+ int status , len ;
1054
1054
1055
1055
if (cxoConnection_isConnected (conn ) < 0 )
1056
1056
return NULL ;
@@ -1059,10 +1059,11 @@ static PyObject *cxoConnection_getVersion(cxoConnection *conn, void *unused)
1059
1059
Py_END_ALLOW_THREADS
1060
1060
if (status < 0 )
1061
1061
return cxoError_raiseAndReturnNull ();
1062
- snprintf (buffer , sizeof (buffer ), "%d.%d.%d.%d.%d" , versionInfo .versionNum ,
1063
- versionInfo .releaseNum , versionInfo .updateNum ,
1064
- versionInfo .portReleaseNum , versionInfo .portUpdateNum );
1065
- return PyUnicode_DecodeASCII (buffer , strlen (buffer ), NULL );
1062
+ len = snprintf (buffer , sizeof (buffer ), "%d.%d.%d.%d.%d" ,
1063
+ versionInfo .versionNum , versionInfo .releaseNum ,
1064
+ versionInfo .updateNum , versionInfo .portReleaseNum ,
1065
+ versionInfo .portUpdateNum );
1066
+ return PyUnicode_DecodeASCII (buffer , len , NULL );
1066
1067
}
1067
1068
1068
1069
You can’t perform that action at this time.
0 commit comments