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

input buffer is mess up if charset decode error #2416

Closed
wants to merge 3 commits into from
Closed

input buffer is mess up if charset decode error #2416

wants to merge 3 commits into from

Conversation

panqingfeng
Copy link

sz maybe uninit if decode() is error

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

1 similar comment
@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

@ruflin
Copy link
Contributor

ruflin commented Aug 30, 2016

@panqingfeng Thanks for the PR. Do you have by some log files we could test this a unit or system test?

@ruflin ruflin added the Filebeat Filebeat label Aug 30, 2016
@ruflin
Copy link
Contributor

ruflin commented Sep 22, 2016

@panqingfeng Just saw you pushed an update. Any chance to share some log files do I can reproduce the issue on my side and we could create some system tests for it?

@panqingfeng
Copy link
Author

I am not sure I can share the log to a 3rd party, I am so sorry...

Here is another way:

  1. curl "https://www.google.com.hk/services/" | grep description > /tmp/out.txt
  2. now you get a UTF-8 Chinese string in /tmp/out.txt
  3. set filebeat encode to GBK (actually it's a UTF-8 string, so I will fail while decoding)

@ruflin
Copy link
Contributor

ruflin commented Oct 2, 2016

@panqingfeng Thanks for the above guide. I will try this one will let you know if I can reproduce it.

ruflin added a commit to ruflin/beats that referenced this pull request Oct 3, 2016
@ruflin
Copy link
Contributor

ruflin commented Oct 3, 2016

@panqingfeng I managed to reproduce based on the examples you gave above. I took your code, did some refactoring and added some tests here: #2661 Could you take a look?

tsg pushed a commit that referenced this pull request Oct 4, 2016
@ruflin
Copy link
Contributor

ruflin commented Oct 4, 2016

@panqingfeng I'm going to close this PR as we merged #2661 to backport it to 5.0. Thanks a lot for digging into this and providing a solution.

@ruflin ruflin closed this Oct 4, 2016
ruflin added a commit to ruflin/beats that referenced this pull request Oct 4, 2016
tsg pushed a commit that referenced this pull request Oct 4, 2016
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants