Skip to content

Commit

Permalink
Merge pull request #85 from dropperY/fix-copy-filename
Browse files Browse the repository at this point in the history
fix copy filename
  • Loading branch information
mronge committed Mar 25, 2013
2 parents 8e7d1c5 + e22aca1 commit 1e8a68c
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 1e8a68c

Please sign in to comment.