Permalink
Browse files

fix the copy filename

  • Loading branch information...
1 parent 28aa229 commit e22aca18fc546930a887efd98302ee2a11070d10 @dropperY dropperY committed Mar 22, 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 e22aca1

Please sign in to comment.