Skip to content

SIGFPE: Division by zero #3

Description

@derselbst

When constructing the BoxFilters here:

signalsmith::envelopes::BoxFilter<Sample> smoother1{0}, smoother2{0};

The BoxFilter's constructor will be called with maxLength==0:

https://github.com/Signalsmith-Audio/dsp/blob/2d20161915e733f117545c6be8cd3275a739a1e3/envelopes.h#L187

This causes a division by zero a few lines below, crashing any program that traps on SIGFPE:

https://github.com/Signalsmith-Audio/dsp/blob/2d20161915e733f117545c6be8cd3275a739a1e3/envelopes.h#L199

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions