From f0125152c37c417620526c7bbcc95ab3acbab3a1 Mon Sep 17 00:00:00 2001 From: lnlan Date: Thu, 3 Mar 2022 13:12:42 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/syscap=5Ftool.c.=20=E9=80=82?= =?UTF-8?q?=E5=BA=94window=E6=96=87=E4=BB=B6=E8=AF=BB=E5=86=99=E5=B7=AE?= =?UTF-8?q?=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lnlan --- src/syscap_tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index f9bd310..723c16f 100755 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -90,7 +90,7 @@ static uint32_t GetFileContext(char *inputFile, char **contextBufPtr, uint32_t * PRINT_ERR("malloc buffer failed, size = %d, errno = %d\n", (int32_t)statBuf.st_size + 1, errno); return -1; } - fp = fopen(inputFile, "r"); + fp = fopen(inputFile, "rb"); if (fp == NULL) { PRINT_ERR("open file(%s) failed, errno = %d\n", inputFile, errno); FreeContextBuffer(contextBuffer); @@ -135,7 +135,7 @@ static int32_t ConvertedContextSaveAsFile(char *outDirPath, char *filename, char return -1; } - fp = fopen(fileFullPath, "w"); + fp = fopen(fileFullPath, "wb"); if (fp == NULL) { PRINT_ERR("can`t create file(%s), errno = %d\n", fileFullPath, errno); return -1; -- Gitee