mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 18:05:21 +00:00
osd: another shitty pointless UB
The pointer could be NULL if the number of bytes to copy was 0. In a sane world, this would be fine, but not the current world.
This commit is contained in:
parent
13c3270891
commit
1e672f08f2
@ -217,8 +217,10 @@ void osd_set_progbar(struct osd_state *osd, struct osd_progbar_state *s)
|
||||
osd_obj->progbar_state.value = s->value;
|
||||
osd_obj->progbar_state.num_stops = s->num_stops;
|
||||
MP_TARRAY_GROW(osd_obj, osd_obj->progbar_state.stops, s->num_stops);
|
||||
if (s->num_stops) {
|
||||
memcpy(osd_obj->progbar_state.stops, s->stops,
|
||||
sizeof(osd_obj->progbar_state.stops[0]) * s->num_stops);
|
||||
}
|
||||
osd_obj->osd_changed = true;
|
||||
osd->want_redraw_notification = true;
|
||||
pthread_mutex_unlock(&osd->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user