diff options
author | Oneric <oneric@oneric.stub> | 2020-10-11 16:31:20 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2020-10-27 01:03:04 +0200 |
commit | 26855a4ad9e74449a80ac1acb99b605ff745eda3 (patch) | |
tree | 507f97e122bf6fe662a071b05d2978c669bfca02 /libass/ass.h | |
parent | 24805c8b33615374b0cec85536a8e10d0f376860 (diff) | |
download | libass-26855a4ad9e74449a80ac1acb99b605ff745eda3.tar.bz2 libass-26855a4ad9e74449a80ac1acb99b605ff745eda3.tar.xz |
API: make ass_alloc_{style,event} alloc-fail safe
Also deal with potential overflows of style and event count.
Since these fields are ints part ofthe public API, but will be cast to
size_t in ASS_REALLOC_ARRAY use the smaller of both limits.
Diffstat (limited to 'libass/ass.h')
-rw-r--r-- | libass/ass.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass.h b/libass/ass.h index 582af83f..bd787f28 100644 --- a/libass/ass.h +++ b/libass/ass.h @@ -580,14 +580,14 @@ void ass_free_track(ASS_Track *track); /** * \brief Allocate new style. * \param track track - * \return newly allocated style id + * \return newly allocated style id >= 0, or a value < 0 on failure */ int ass_alloc_style(ASS_Track *track); /** * \brief Allocate new event. * \param track track - * \return newly allocated event id + * \return newly allocated event id >= 0, or a value < 0 on failure */ int ass_alloc_event(ASS_Track *track); |