qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] gcrypt: test_tls_psk_init should write binary file inste


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 1/2] gcrypt: test_tls_psk_init should write binary file instead text file.
Date: Tue, 13 Oct 2020 12:52:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 10/13/20 3:03 AM, Yonggang Luo wrote:
On windows, if open file with "w", it's will automatically convert
"\n" to "\r\n" when writing to file.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
  tests/crypto-tls-psk-helpers.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/crypto-tls-psk-helpers.c b/tests/crypto-tls-psk-helpers.c
index a8395477c3..11ae26368c 100644
--- a/tests/crypto-tls-psk-helpers.c
+++ b/tests/crypto-tls-psk-helpers.c
@@ -32,7 +32,7 @@ void test_tls_psk_init(const char *pskfile)
  {
      FILE *fp;
- fp = fopen(pskfile, "w");
+    fp = fopen(pskfile, "wb");
      if (fp == NULL) {
          g_critical("Failed to create pskfile %s", pskfile);
          abort();


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]