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

R_API char *r_file_slurp(const char *str, int *usz) #12954

Open
radare opened this issue Jan 30, 2019 · 2 comments
Open

R_API char *r_file_slurp(const char *str, int *usz) #12954

radare opened this issue Jan 30, 2019 · 2 comments

Comments

@radare
Copy link
Collaborator

radare commented Jan 30, 2019

file size as int? ok we dont want > 4GB slurps,, but char*... unless the file is plaintext..

@XVilka XVilka changed the title R_API char *r_file_slurp(const char *str, int *usz) { R_API char *r_file_slurp(const char *str, int *usz) Jan 31, 2019
@deepakchethan
Copy link
Contributor

deepakchethan commented Feb 7, 2019

So the issue is about not slurping the file if the file size is greater than 4GB right. I apologize in advance for asking such a dumb question.
Cause that particular method already finds size in terms of int.

@lowlyw
Copy link
Collaborator

lowlyw commented Feb 15, 2019

r_file_gzslurp, r_file_slurp_hexpairs also have similar signature, (int size), this should either bessize_t to match with read or other type of functions, or size_t to be reasonable

also

r_file_slurp_range returns char * as well

the ones that get specific lines are probably ok with char *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants