Skip to content

bug: dstr_replace never terminates when find is the empty string #47

Closed

Description

@zackees

libobs/util/dstr.c dstr_replace never terminates when find is "": strstr(temp, "") always returns temp. With replace_len == 0, temp += replace_len never advances; with a longer replacement it grows forever. test_dstr.c skips the case. Decide the semantics (no-op, or reject), fix in C with a RED test, and record the choice for the dstr port (#43).

Refs #4, #43

Activity

  1. added 6 commits that reference this issue on Oct 10, 2026
    2865dbd
    df3d37a
    b67ffe0
    44b8ca5
    d78753f
    b90c14a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions