Skip to content

fix ora-03131 on bigendian 64bit machines #7422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ext/oci8/oci8_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,10 @@ sb4 php_oci_bind_out_callback(

/* XXX we assume that zend-zval len has 4 bytes */
*alenpp = (ub4*) &Z_STRLEN_P(val);
#ifdef WORDS_BIGENDIAN
// on bigendian machines ub4-length must be stored into last 4 bytes of zend_string-length
if(sizeof(size_t)==2*sizeof(ub4)) ++*alenpp;
#endif
*bufpp = Z_STRVAL_P(val);
*piecep = OCI_ONE_PIECE;
*rcodepp = &phpbind->retcode;
Expand Down