diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-06-23 16:04:10 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-06-23 16:04:10 -0700 |
| commit | a1ac9a6f60c6881bb9fe97425f6aaa524b910035 (patch) | |
| tree | f154429f4cfcab066f1d4dc7dbeb8c00679e3e3d | |
| parent | c74c1f28b3db3a02630a7c80d0b98838a025fd90 (diff) | |
Fix panic when commenting file without existing info fork
| -rw-r--r-- | hotline/flattened_file_object.go | 1 |
1 files changed, 1 insertions, 0 deletions
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))) |