aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-12-21 15:14:45 +0000
committerJustus Winter <[email protected]>2016-12-21 15:14:45 +0000
commitaa6b3449bf1b42703b4c6466d87f91620743a5d2 (patch)
treef22961aa518997572d6ff6785e6d0cd14834dfda
parenttests: Move argument parser. (diff)
downloadlibgpg-error-aa6b3449bf1b42703b4c6466d87f91620743a5d2.tar.gz
libgpg-error-aa6b3449bf1b42703b4c6466d87f91620743a5d2.zip
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: e7429b1ced0c69fa7901f888f8dc25f00fc346a4 Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--scheme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scheme.c b/scheme.c
index a5b7691..2844545 100644
--- a/scheme.c
+++ b/scheme.c
@@ -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 =