Skip to content
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

Adjust examples and tests which use CURLOPT_READFUNCTION #6392

Closed
wants to merge 1 commit into from
Closed

Adjust examples and tests which use CURLOPT_READFUNCTION #6392

wants to merge 1 commit into from

Conversation

olafhering
Copy link
Contributor

The type of the buffer in curl_read_callback is 'char *', not 'void *'.

Signed-off-by: Olaf Hering olaf@aepfle.de

@olafhering
Copy link
Contributor Author

Bad examples lead to bad code, as discussed in anonbeat/guayadeque#113

@bagder
Copy link
Member

bagder commented Dec 30, 2020

I don't understand how the examples caused any bad code. Can you elaborate? Neither kind of pointer implies that the data is null-terminated and the docs is very clear on the fact that for the write callback the data is not null-terminated.

The type of the buffer in curl_read_callback is 'char *', not 'void *'.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
@bagder bagder closed this in f2ed79d Dec 30, 2020
@bagder
Copy link
Member

bagder commented Dec 30, 2020

Thanks!

@olafhering olafhering deleted the CURLOPT_READFUNCTION branch December 30, 2020 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants