Rewinded file to beginning

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
Tyrolyean 2020-04-25 01:57:59 +02:00
parent ece1e21535
commit 665a03c45a
No known key found for this signature in database
GPG Key ID: 81EC9BAC5E9667C6
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ char* attach_files(FILE* buffer){
return NULL;
}
memset(new_body,0, len + 1);
fseek(buffer, 0, SEEK_SET);
if(fread(new_body, 1, len, buffer) <= 0){
perror("Failed to read file buffer");
free(new_body);