diff --git a/src/muntar.c b/src/muntar.c index 09f89bf..8b09b7f 100644 --- a/src/muntar.c +++ b/src/muntar.c @@ -219,7 +219,7 @@ int untar_to_path(const char *path, const uint8_t *buf, const size_t namelen = strlen(header->name); if(p-tpath+namelen>1023) return(MTAR_EOPENFAIL); strcpy(p,header->name); - FILE *fp = fopen(tpath,"w"); + FILE *fp = fopen(tpath,"wb"); if(!fp) { fprintf(stderr, "Error open file for write: %s\n",