FMOD reads data out of bounds

My code is like this

s_system->setSoftwareFormat(44100, FMOD_SPEAKERMODE_STEREO, 0);
s_system->init(16, FMOD_INIT_NORMAL, nullptr);
void AudioManager::loadSound(Sound* sound, Sound::Info* info, U8* data) {
    std::memset(&exinfo, 0, sizeof(exinfo));

    exinfo.cbsize = sizeof(exinfo);
    exinfo.length = info->dataSize;
    exinfo.numchannels = info->numChannels;
    exinfo.defaultfrequency = info->sampleRate;

    if (info->format == Format::PCM16) {
        exinfo.format = FMOD_SOUND_FORMAT_PCM16;
        exinfo.suggestedsoundtype = FMOD_SOUND_TYPE_RAW;

        s_system->createSound((char*)data, FMOD_LOWMEM | FMOD_CREATESAMPLE | FMOD_OPENMEMORY_POINT | FMOD_OPENRAW, &exinfo, (FMOD::Sound**)&sound->m_sound);

void Sound::load(U8* data, U32 dataSize) {
    Info info;
    info.format = Format::PCM16;
    info.dataSize = dataSize;
    info.numChannels = 1;
    info.sampleRate = 22050;

    int inc = (info.format == Format::PCM16) * info.numChannels * 2;
    m_data = resourceManager().alloc(dataSize + inc);   // U8* m_data;
    std::memcpy(m_data, data, dataSize);
    if (inc)
        std::memset(m_data + dataSize, 0x7f, inc);
     // std::memset(m_data + dataSize, 0, inc);   // fix

    audioManager().loadSound(this, &info, m_data);

I’m using the latest Low level API 1.0.9 for MacOS.
When I play short PCM16 sound with 22050 sample rate, I hear click at the end. To fix this I add zero bytes to the end of data. Is it normal behaviour?

I add zeroes not to the end, but after it to fix clicking. Please see the code above.

If your sample data doesn’t end at a zero crossing (or close to it) and there is no fade out then yes you will get a clicking sound when the sound cuts out.

But my sound ends at zero. And I add zeroes not to sample, but after it. If I say FMOD not to use my buffer with FMOD_OPENMEMORY_POINT, there will be no clicking at all.