Skip to content

v0.9.28 - Leftshift of negative value #489

Open
@TedLyngmo

Description

@TedLyngmo

asn_INTEGER2long() sets a long to -1 and leftshifts:

        long l;

        // ...

	if((*b >> 7)) l = -1; else l = 0;

	/* Conversion engine */
	for(; b < end; b++)
		l = (l << 8) | *b;

This means we can't turn on UBsan in our gate. This makes UBsan happy:

https://github.com/TedLyngmo/asn1c/tree/v0.9.28-maint-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions