Closed kubo closed 2 years ago
Thanks, Kubo. Its not strictly a bug as it is extremely unlikely that an embedded NULL character would be passed and it is uncertain what would happen in the database if one was. Nevertheless, memcpy() is the safer approach anyway, so I changed it!
Thanks for fixing.
ODPIC 4.3.0
https://github.com/oracle/odpi/blob/515a426239cfbd37d9446def11d0c5f8f1bb808b/src/dpiConn.c#L1343-L1348
xid->globalTransactionId
andxid->branchQualifier
are copied bystrncpy
. Bytes after a nul byte are zeroed. Shouldn't it bememcpy
?In the man page of
strncpy
:Well, if global transaction id and branch qualifier must not contain null, this isn't a bug.