1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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

View file

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