Permalink
Browse files

Merge pull request #85 from dropperY/fix-copy-filename

fix copy filename
  • Loading branch information...
2 parents 8e7d1c5 + e22aca1 commit 1e8a68c08b0b0f6db1ff779847550fe9a708738a @mronge mronge committed Mar 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/CTMIME_SinglePart.m
@@ -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,

0 comments on commit 1e8a68c

Please sign in to comment.