gpg: Make sure that internal key import is done with a binary stream.
authorWerner Koch <wk@gnupg.org>
Wed, 28 Sep 2016 11:36:28 +0000 (13:36 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 28 Sep 2016 11:36:28 +0000 (13:36 +0200)
* g10/import.c (import_keys_internal): Open stream in binary mode.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/import.c

index f32a3da..6a0dcde 100644 (file)
@@ -465,7 +465,7 @@ import_keys_es_stream (ctrl_t ctrl, estream_t fp,
   int rc;
   iobuf_t inp;
 
-  inp = iobuf_esopen (fp, "r", 1);
+  inp = iobuf_esopen (fp, "rb", 1);
   if (!inp)
     {
       rc = gpg_error_from_syserror ();