Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

Negative allocation when ngram_prob is called with 0 words #75

@guidovranken

Description

@guidovranken
#include <sphinxbase/logmath.h>
#include <sphinxbase/ngram_model.h>

int main(void)
{
    logmath_t* lm = logmath_init(1.0001, 0, 0);
    ngram_model_t* model = ngram_model_read(NULL, "100.lm.dmp", NGRAM_BIN, lm);
    ngram_prob(model, NULL, 0);
    ngram_model_free(model);
    logmath_free(lm);
    return 0;
}

This could lead to a crash.

If you acknowledge and fix this, could you please credit 'ForAllSecure Mayhem'?

Thanks

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