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

uper_open_type_skip bug #129

Closed
johnhypo opened this issue May 10, 2023 · 2 comments
Closed

uper_open_type_skip bug #129

johnhypo opened this issue May 10, 2023 · 2 comments

Comments

@johnhypo
Copy link

johnhypo commented May 10, 2023

Look at comment in code. Help!

int
uper_open_type_skip(asn_codec_ctx_t *ctx, asn_per_data_t *pd) {
	asn_TYPE_descriptor_t s_td;
	asn_dec_rval_t rv;

	s_td.name = "<unknown extension>";
//s_td not initiallized, this  assignment statement crashes.
//it occured while I use asn1c to parse PDU MultimediaSystemControlMessage
//refer to https://github.com/vlm/asn1c/issues/475
	s_td.op->uper_decoder = uper_sot_suck;

	rv = uper_open_type_get(ctx, &s_td, 0, 0, pd);
	if(rv.code != RC_OK)
		return -1;
	else
		return 0;
}
@mouse07410
Copy link
Owner

This is probably beyond my competency - but there's no need to "initialize" anything there, IMHO.

asn_TYPE_descriptor_t is a structure with a field name that is a pointer to a string. The code assigns to it a pointer to "<unknown_extension>". I don't see a problem there, from C point of view.

Perhaps, with more information (like OS, compiler, etc.) and a minimal reproducer, I could try to dig deeper...?

Repository owner deleted a comment from johnhypo Jun 15, 2023
@mouse07410
Copy link
Owner

Since I don't know what to do with this issue, sorry to say I'm closing it. Please re-open if you have anything to add that would make it easier to determine what's wrong and how to fix it.

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