Empty tables yield a segmentation fault on `--display` #150

Closed
ydahhrk opened this Issue Apr 20, 2015 · 1 comment

Projects

None yet

1 participant

@ydahhrk
Member
ydahhrk commented Apr 20, 2015

Or not.

The problem is an array out of bounds. Because this yields undefined behaviour, some versions of gcc cause a segfault, others simply copy bogus memory to a structure field that will never be read. Other versions might do something else.

Applies to --eamt --display, --pool4 --display, --bib --display and --session --display.

This is an userspace application problem, which means it doesn't crash the kernel.

Thanks to Edgar Rodriguez for pointing this out.

@ydahhrk ydahhrk added this to the 3.3.3 milestone Apr 20, 2015
@ydahhrk ydahhrk added a commit that referenced this issue Apr 20, 2015
@ydahhrk ydahhrk Added code to avoid the index out of bounds. These instructions were …
…meaningless in these situations anyway.

Fixes issue #150.
0636fef
@ydahhrk
Member
ydahhrk commented Aug 17, 2015

Merged; closing.

@ydahhrk ydahhrk closed this Aug 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment