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

parse_multipart_form_data corrupts binary file #18

Closed
aubonbeurre opened this issue May 25, 2013 · 1 comment
Closed

parse_multipart_form_data corrupts binary file #18

aubonbeurre opened this issue May 25, 2013 · 1 comment

Comments

@aubonbeurre
Copy link

Hi,

//const char *next_ptr = strstr(ptr, boundary.c_str());
const char *next_ptr = std::search(ptr, end_ptr, boundary.begin(), boundary.end());

strstr will stop at the null character, hence it will fail to find the boundary marker, and the latter will be appended to the file

Hope it helps,
alex

@mikedickey
Copy link
Contributor

Checked into develop, thanks!

pmed pushed a commit to pmed/pion that referenced this issue Dec 19, 2013
parse_multipart_form_data corrupts binary file

thanks to Alexandre Parenteau
pmed pushed a commit to pmed/pion that referenced this issue Dec 19, 2013
…er.cpp

I believe this is related to and may have been at least mostly alleviated by
the earlier fix made for this: splunk#18

This just includes a unit test + updates to make form content parsing safer
+ removes unnecessary extra work when in "headers only" parsing mode
mikedickey pushed a commit that referenced this issue Oct 28, 2014
* commit '5696ec59c427b067fa284cf594eb48fa88fdc772':
  PION-1328: Convert pion.sln to VS 2013.
firedaemon-cto referenced this issue in FireDaemon/pion Aug 27, 2020
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

No branches or pull requests

2 participants