Problem appending attribute using AppleEXR

This is on macOS 13.2.1, M1 Max.

I'm having an issue appending an attribute using AppleEXR. If I don't append the attribute (i.e. by commenting the code), the file appears to be valid. However when I add the attribute I can no longer load the image, and the opensource OpenEXR lib throws an exception about an attribute name longer than 255 chars.

The lines in question are:

const int32_t val = 1;
const char *name = "acesImageContainerFlag";
const char *type = "int";
auto err = axr_part_append_attribute(part,
                                     name,
                                     type,
                                     sizeof val,
                                     reinterpret_cast<const uint8_t *>(&val),
                                     0,
                                     nullptr);
if (err != axr_error_success) {
    auto errStr = axr_error_get_name(err); 
    NSLog(@"Failed to set acesImageContainerFlag: %s", errStr);
}

The err variable is always axr_error_success. Debugging into the opensource OpenEXR library when attempting to load the file, it seems like the attribute name and attribute type aren't being null terminated.

I can append the chromaticities attribute successfully using axr_part_set_chromaticities.

The structure of my code is as follows:

axr_encoder_create
axr_encoder_append_part
/*axr_part_append_attribute*/
axr_part_set_chromaticities
axr_part_append_channels
axr_encoder_compress