mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
Correctly write in file: do not use fprintf but fputs...
This commit is contained in:
parent
b2748f5283
commit
8164e9434c
1 changed files with 3 additions and 2 deletions
|
|
@ -127,10 +127,11 @@ FILE* gzuncompress(const char* filepath) {
|
|||
char buffer[512];
|
||||
output = fopen(newname, "w+");
|
||||
while (gzread(file, buffer, 511) > 0) {
|
||||
fprintf(output, buffer, strlen(buffer));
|
||||
fputs(buffer, output);
|
||||
memset(buffer, 0, strlen(buffer));
|
||||
}
|
||||
|
||||
gzclose(file);
|
||||
CU_ASSERT_EQUAL(gzclose(file), Z_OK);
|
||||
ms_free(newname);
|
||||
|
||||
fseek(output, 0, SEEK_SET);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue