gpgscm: Guard use of union member.

* tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
before accessing filename.  Fixes a crash on 32-bit architectures.

Fixes-commit: e7429b1ced
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-12-21 16:14:45 +01:00
parent 6204f8104f
commit 6e96cdd41a
1 changed files with 1 additions and 1 deletions

View File

@ -4838,7 +4838,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
} else {
sc->nesting_stack[sc->file_i]++;
#if USE_TAGS && SHOW_ERROR_LINE
{
if (sc->load_stack[sc->file_i].kind & port_file) {
const char *filename =
sc->load_stack[sc->file_i].rep.stdio.filename;
int lineno =