Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

IPlugVST3 might crash the Plugin when initalizing reqNumInputChannels or reqNumOutputChannels #60

Open
@theodark

Description

Lines 278 and 279 at IPlugVST3 might cause an access violation if the 'inputs' or 'outputs' arrays are empty (for example in a VST instrument). I've encountered this error in Win x64 Debug configuration of my VST3 plugin.

It would be safer if the code looked if there are any channels initialized and then get their speaker arrangement. For example.

  int32 reqNumInputChannels = 0;
  if(NInChannels() > 0)
      reqNumInputChannels = SpeakerArr::getChannelCount(inputs[0]);  //requested # input channels
  int32 reqNumOutputChannels = 0;
  if(NOutChannels() > 0)
      reqNumOutputChannels = SpeakerArr::getChannelCount(outputs[0]);//requested # output channels

  • I'm sorry if I'm doing something wrong its the first time I try to contribute to Github :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions