From a1ac9a6f60c6881bb9fe97425f6aaa524b910035 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Thu, 23 Jun 2022 16:04:10 -0700 Subject: Fix panic when commenting file without existing info fork --- hotline/flattened_file_object.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hotline/flattened_file_object.go b/hotline/flattened_file_object.go index 6ccd9d7..63a189a 100644 --- a/hotline/flattened_file_object.go +++ b/hotline/flattened_file_object.go @@ -69,6 +69,7 @@ func (ffif *FlatFileInformationFork) friendlyCreator() []byte { } func (ffif *FlatFileInformationFork) setComment(comment []byte) error { + ffif.CommentSize = make([]byte, 2) ffif.Comment = comment binary.BigEndian.PutUint16(ffif.CommentSize, uint16(len(comment))) -- cgit