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

Negative allocation when ngram_prob is called with 0 words #75

Open
guidovranken opened this issue Mar 21, 2020 · 0 comments
Open

Negative allocation when ngram_prob is called with 0 words #75

guidovranken opened this issue Mar 21, 2020 · 0 comments

Comments

@guidovranken
Copy link

#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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant