Skip to content

Commit

Permalink
fix the copy filename
Browse files Browse the repository at this point in the history
  • Loading branch information
dropperY committed Mar 22, 2013
1 parent 28aa229 commit e22aca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/CTMIME_SinglePart.m
Expand Up @@ -205,7 +205,7 @@ - (struct mailmime *)buildMIMEStruct {

if (mFilename) {
char *charData = (char *)[mFilename cStringUsingEncoding:NSUTF8StringEncoding];
char *dupeData = malloc(strlen(charData));
char *dupeData = malloc(strlen(charData) + 1);
strcpy(dupeData, charData);
mime_fields = mailmime_fields_new_filename( MAILMIME_DISPOSITION_TYPE_ATTACHMENT,
dupeData,
Expand Down

0 comments on commit e22aca1

Please sign in to comment.