deps-libff: Fix stack corruption
ff_clock_init expects a parameter with a pointer where it stores the address of the newly allocated ff_clock, but ff_demuxer_reset does not provide this parameter. That somehow writes the pointer to the ff_clock into the packet->base->buf field on the stack of the ff_demuxer_reset function. This later causes a segmentation fault when the packet is freed. Closes jp9000/obs-studio#448
This commit is contained in:
parent
fdcb27230c
commit
e96c7c86b6
4
deps/libff/libff/ff-clock.c
vendored
4
deps/libff/libff/ff-clock.c
vendored
@ -90,9 +90,9 @@ bool ff_clock_start(struct ff_clock *clock, enum ff_av_sync_type sync_type,
|
||||
return !release && !aborted;
|
||||
}
|
||||
|
||||
struct ff_clock *ff_clock_init(struct ff_clock *clock)
|
||||
struct ff_clock *ff_clock_init(void)
|
||||
{
|
||||
clock = av_mallocz(sizeof(struct ff_clock));
|
||||
struct ff_clock *clock = av_mallocz(sizeof(struct ff_clock));
|
||||
|
||||
if (clock == NULL)
|
||||
return NULL;
|
||||
|
2
deps/libff/libff/ff-clock.h
vendored
2
deps/libff/libff/ff-clock.h
vendored
@ -50,7 +50,7 @@ struct ff_clock {
|
||||
|
||||
typedef struct ff_clock ff_clock_t;
|
||||
|
||||
struct ff_clock * ff_clock_init();
|
||||
struct ff_clock * ff_clock_init(void);
|
||||
double ff_get_sync_clock(struct ff_clock *clock);
|
||||
struct ff_clock *ff_clock_retain(struct ff_clock *clock);
|
||||
struct ff_clock *ff_clock_move(struct ff_clock **clock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user