Skip to content

Fix bug #67704: CURLOPT_POSTFIELDS modify the type of param base php-5.5 #927

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

Closed
wants to merge 2 commits into from

Conversation

redfoxli
Copy link
Contributor

@redfoxli redfoxli commented Dec 1, 2014

curl_setopt will modify the type of param
the bugs is here: https://bugs.php.net/bug.php?id=67704

when the type of param is not string, we use a temp variable, then convert it to string, free the memory of the variable at last

bug fix base php-5.4 is here: #924

@datibbaw
Copy link
Contributor

datibbaw commented Dec 1, 2014

Can you also fix the issue for the s_list assignments, such as CURLOPT_HTTPHEADER?

@redfoxli
Copy link
Contributor Author

redfoxli commented Dec 2, 2014

@datibbaw
Yes, I can do it
CURLOPT_HTTPHEADER or CURLOPT_QUOTE or CURLOPT_HTTP200ALIASES ... has the problem, modify the type of param
Report a bug in bugs.php.net and post a new PR in here ?

@datibbaw
Copy link
Contributor

datibbaw commented Dec 2, 2014

Might as well do it within this PR, since the issue is highly related and occurs in the same function, too.

@redfoxli
Copy link
Contributor Author

redfoxli commented Dec 2, 2014

@datibbaw
Yes
I add the issue for the s_list assignments in bug 67704 (https://bugs.php.net/bug.php?id=67704)
and fix bug in this PR

zval *tmp_current_ptr = NULL;

if (Z_TYPE_PP(current) != IS_STRING) {
tmp_current = **current;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use ZVAL_COPY_VALUE macro here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laruence in 5.5 that doesn't work if the left operand is &tmp_current; I think that was only changed in master.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datibbaw okey.. :<

@smalyshev smalyshev added the Bug label Dec 6, 2014
@krakjoe
Copy link
Member

krakjoe commented Jan 2, 2017

This no longer applies to any supported branch of PHP, so closing PR.

@krakjoe krakjoe closed this Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants