File gnupg-CVE-2019-13050_5_of_5.patch of Package gpg2.11995

commit a29156d5a650702ad79fe11f45782bc4bc159c13
Author: Werner Koch <wk@gnupg.org>
Date:   Tue Jul 9 11:13:51 2019 +0200

    gpg: Do not try the import fallback if the options are already used.
    
    * g10/import.c (import_one): Check options.
    
    Signed-off-by: Werner Koch <wk@gnupg.org>

Index: gnupg-2.2.5/g10/import.c
===================================================================
--- gnupg-2.2.5.orig/g10/import.c
+++ gnupg-2.2.5/g10/import.c
@@ -2153,7 +2153,9 @@ import_one (ctrl_t ctrl,
                          from_sk, silent, screener, screener_arg,
                          origin, url);
   if (gpg_err_code (err) == GPG_ERR_TOO_LARGE
-      && gpg_err_source (err) == GPG_ERR_SOURCE_KEYBOX)
+      && gpg_err_source (err) == GPG_ERR_SOURCE_KEYBOX
+      && ((options & (IMPORT_SELF_SIGS_ONLY | IMPORT_CLEAN))
+          != (IMPORT_SELF_SIGS_ONLY | IMPORT_CLEAN)))
     {
       /* We hit the maximum image length.  Ask the wrapper to do
        * everything again but this time with some extra options.  */
openSUSE Build Service is sponsored by