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

Fix a few crashes on 1.9 #2335

Closed
wants to merge 4 commits into from
Closed

Fix a few crashes on 1.9 #2335

wants to merge 4 commits into from

Conversation

jb55
Copy link
Collaborator

@jb55 jb55 commented Jul 15, 2024

Some japanese user profiles are breaking the flatbuffer profile builder for some reason

Changelog-Fixed: Fix pretty bad crash when building flatbuffer profiles

jb55 added 4 commits July 14, 2024 19:36
Some japanese user profiles are breaking the flatbuffer profile
builder for some reason

Changelog-Fixed: Fix pretty bad crash when building flatbuffer profiles
Signed-off-by: William Casarin <jb55@jb55.com>
This fixes a reflection runtime error for our custom picker

Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Fixed: Fix crash when adding duplicate mute items
Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Fixed: Fix crash on profile page when there are profile updates
Signed-off-by: William Casarin <jb55@jb55.com>
@jb55
Copy link
Collaborator Author

jb55 commented Jul 15, 2024

Went through and fixed a bunch more crashes

@jb55 jb55 changed the title Fix bad crash on 1.9 Fix a few crashes on 1.9 Jul 15, 2024
@jb55 jb55 mentioned this pull request Jul 15, 2024
@@ -82,7 +82,7 @@ extern "C" {
* Note: some internal assertion will remain if disabled.
*/
#ifndef FLATCC_BUILDER_ASSERT_ON_ERROR
#define FLATCC_BUILDER_ASSERT_ON_ERROR 1
#define FLATCC_BUILDER_ASSERT_ON_ERROR 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we ruled out the risk that the aforementioned errors could corrupt flatbuffer data and cause further issues down the line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is handled here:

	NdbProfile_parse_json_table(ctx, buf, buf + bufsiz, profile);
	if (ctx->error)
		return 0;

in ndbprofile_parse_json

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Do we have similar guards around other flatbuffer objects like ndbnotes and such (given that this constant looks global)? If we do, then this LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

The changes in this file LGTM

@jb55
Copy link
Collaborator Author

jb55 commented Jul 15, 2024

Closing in favor of #2336

@jb55 jb55 closed this Jul 15, 2024
@jb55 jb55 deleted the fix-crash-1.9 branch July 15, 2024 04:33
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.

2 participants