Prevent garbage from being appended when setting comment. https://github.com/specious/osxutils/issues/7 https://github.com/ryandesign/osxutils/commit/7fcb5de49d307673ec8cd13344ead27737ab6fc6 --- setfcomment/setfcomment.c.orig +++ setfcomment/setfcomment.c @@ -309,6 +309,7 @@ pascal OSErr MoreFESetComment(const FSRef *pFSRefPtr, const FSSpecPtr pFSSpecPtr { char* dataPtr = NewPtr(pCommentStr[0] + 1); strncpy(dataPtr, (char*)pCommentStr + 1, pCommentStr[0]); + dataPtr[pCommentStr[0]] = 0; anErr = AEBuildAppleEvent( kAECoreSuite,kAESetData, typeApplSignature,&gFinderSignature,sizeof(OSType),