Skip to content

Commit

Permalink
opensource_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ESResearchDepartment committed Jun 26, 2023
1 parent dbafa57 commit 9561b33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ missing
*Makefile.in
stamp-h1
xcuserdata
Build
configure~
7 changes: 4 additions & 3 deletions libfragmentzip/libfragmentzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ int fragmentzip_download_to_memory(fragmentzip_t *info, const char *remotepath,

cassure(compressed = (t_downloadBuffer*)malloc(sizeof(t_downloadBuffer)));
bzero(compressed, sizeof(t_downloadBuffer));


compressed->callback = callback;

cassure(compressed->buf = (char*)malloc(compressed->size_buf = sizeof(fragentzip_local_file)));

char downloadRange[100] = {0};
Expand All @@ -466,8 +468,7 @@ int fragmentzip_download_to_memory(fragmentzip_t *info, const char *remotepath,
cassure(!fseek(info->localFile, doffset, SEEK_SET));
cassure(compressed->size_buf == fread(compressed->buf, 1, compressed->size_buf, info->localFile));
}
compressed->callback = callback;


cassure(strncmp(compressed->buf, "\x50\x4b\x03\x04", 4) == 0);

lfile = (fragentzip_local_file*)compressed->buf;
Expand Down

0 comments on commit 9561b33

Please sign in to comment.