Buffer size and single note requests
Given that the maximum supported note size is 1024 bytes, the provided buffer area (if any) must be at least as big as 1024 bytes when reading or deleting a note. Since the application has no ability to specify the maximum size note that the note pad needs to support, XCF assumes that all note pads support 1024 byte notes. As a consequence, should it be the case that the application only uses null notes, it must still provide a 1024 byte buffer when reading what is always known to be a note with no content.
Given that only two note sizes are supported (0 and 1024), the buffer length must be either 0 or 1024 when creating, writing, or replacing a note.