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

Possible stray 'n' prefix for strndup. #4

Closed
wants to merge 1 commit into from
Closed

Possible stray 'n' prefix for strndup. #4

wants to merge 1 commit into from

Conversation

gamaral
Copy link

@gamaral gamaral commented Nov 6, 2016

No description provided.

Copy link
Owner

@babelouest babelouest left a comment

Choose a reason for hiding this comment

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

If you don't mind, I won't accept this Pull Request since it's not a bugfix or a new feature ;)

But feel free to use it if you want to

@@ -585,7 +585,7 @@ int mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const ch

struct connection_info_struct * con_info = coninfo_cls;
size_t cur_size = size;
char * data_dup = nstrndup(data, size); // Force value to end with a NULL character
Copy link
Owner

Choose a reason for hiding this comment

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

Actually, the n* functions are defined in orcania repository which is a mini project containing among others nstrdup and nstrndup.

This functions is created to avoid a crash when a data is NULL or size is 0.

Ulfius depends on Orcania to compile:
https://github.com/babelouest/orcania

Copy link
Author

Choose a reason for hiding this comment

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

Ah, that explains it. I started getting a missing reference after I updated the repository.

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

Successfully merging this pull request may close these issues.

None yet

2 participants