Fix crash in scheme interpreter used for tests.

This commit is contained in:
Tomas Mraz 2016-12-22 11:46:21 +01:00
parent 5487894211
commit effe151796

View File

@ -1,6 +1,6 @@
diff -up gnupg-2.1.17/configure.ac.build gnupg-2.1.17/configure.ac diff -up gnupg-2.1.17/configure.ac.build gnupg-2.1.17/configure.ac
--- gnupg-2.1.17/configure.ac.build 2016-12-20 11:19:05.000000000 +0100 --- gnupg-2.1.17/configure.ac.build 2016-12-20 11:19:05.000000000 +0100
+++ gnupg-2.1.17/configure.ac 2016-12-22 08:58:51.115299092 +0100 +++ gnupg-2.1.17/configure.ac 2016-12-22 09:03:48.114757301 +0100
@@ -89,8 +89,8 @@ AC_GNU_SOURCE @@ -89,8 +89,8 @@ AC_GNU_SOURCE
# CFLAGS (they are restored at the end of the configure script). This # CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd # is because some configure checks don't work with -Werror, but we'd
@ -23,7 +23,7 @@ diff -up gnupg-2.1.17/configure.ac.build gnupg-2.1.17/configure.ac
# Decide what to build # Decide what to build
diff -up gnupg-2.1.17/configure.build gnupg-2.1.17/configure diff -up gnupg-2.1.17/configure.build gnupg-2.1.17/configure
--- gnupg-2.1.17/configure.build 2016-12-20 11:28:20.000000000 +0100 --- gnupg-2.1.17/configure.build 2016-12-20 11:28:20.000000000 +0100
+++ gnupg-2.1.17/configure 2016-12-22 08:58:51.116299114 +0100 +++ gnupg-2.1.17/configure 2016-12-22 09:03:48.116757345 +0100
@@ -5039,8 +5039,8 @@ $as_echo "$ac_cv_safe_to_define___extens @@ -5039,8 +5039,8 @@ $as_echo "$ac_cv_safe_to_define___extens
# CFLAGS (they are restored at the end of the configure script). This # CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd # is because some configure checks don't work with -Werror, but we'd
@ -45,8 +45,8 @@ diff -up gnupg-2.1.17/configure.build gnupg-2.1.17/configure
# #
# Decide what to build # Decide what to build
diff -up gnupg-2.1.17/dirmngr/Makefile.am.build gnupg-2.1.17/dirmngr/Makefile.am diff -up gnupg-2.1.17/dirmngr/Makefile.am.build gnupg-2.1.17/dirmngr/Makefile.am
--- gnupg-2.1.17/dirmngr/Makefile.am.build 2016-12-22 08:58:51.116299114 +0100 --- gnupg-2.1.17/dirmngr/Makefile.am.build 2016-12-20 11:19:05.000000000 +0100
+++ gnupg-2.1.17/dirmngr/Makefile.am 2016-12-22 09:01:02.632165482 +0100 +++ gnupg-2.1.17/dirmngr/Makefile.am 2016-12-22 09:03:48.116757345 +0100
@@ -141,7 +141,7 @@ endif @@ -141,7 +141,7 @@ endif
t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \ t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
@ -66,8 +66,8 @@ diff -up gnupg-2.1.17/dirmngr/Makefile.am.build gnupg-2.1.17/dirmngr/Makefile.am
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS) t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
diff -up gnupg-2.1.17/dirmngr/Makefile.in.build gnupg-2.1.17/dirmngr/Makefile.in diff -up gnupg-2.1.17/dirmngr/Makefile.in.build gnupg-2.1.17/dirmngr/Makefile.in
--- gnupg-2.1.17/dirmngr/Makefile.in.build 2016-12-22 08:58:51.117299136 +0100 --- gnupg-2.1.17/dirmngr/Makefile.in.build 2016-12-20 11:28:18.000000000 +0100
+++ gnupg-2.1.17/dirmngr/Makefile.in 2016-12-22 09:02:03.802492934 +0100 +++ gnupg-2.1.17/dirmngr/Makefile.in 2016-12-22 09:03:48.116757345 +0100
@@ -665,7 +665,7 @@ module_tests = $(am__append_13) @@ -665,7 +665,7 @@ module_tests = $(am__append_13)
t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \ t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
@ -86,3 +86,16 @@ diff -up gnupg-2.1.17/dirmngr/Makefile.in.build gnupg-2.1.17/dirmngr/Makefile.in
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS) t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
diff -up gnupg-2.1.17/tests/gpgscm/scheme.c.build gnupg-2.1.17/tests/gpgscm/scheme.c
--- gnupg-2.1.17/tests/gpgscm/scheme.c.build 2016-12-20 11:19:05.000000000 +0100
+++ gnupg-2.1.17/tests/gpgscm/scheme.c 2016-12-22 11:04:42.043709362 +0100
@@ -4844,6 +4844,9 @@ static pointer opexe_5(scheme *sc, enum
int lineno =
sc->load_stack[sc->file_i].rep.stdio.curr_line;
+ if (filename == NULL) {
+ filename = "";
+ }
s_save(sc, OP_TAG_VALUE,
cons(sc, mk_string(sc, filename),
cons(sc, mk_integer(sc, lineno), sc->NIL)),