Skip to content

fx_media_opened_file_count becomes -1 (0xFFFF FFFF) which in turn sends fx_file_open and other functions into endless loop #73

@jerrylogansquare

Description

@jerrylogansquare

There are no guards on this line of code. If fx_media_opened_file_count happens to be 0, it will become -1 (0xFFFF FFFF)

media_ptr -> fx_media_opened_file_count--;

In many functions, we have this common sequence of code below. When fx_media_opened_file_count is -1, the while loop will run indefinitely and the processor gets stuck, resulting in watchdog reset.

    /* Loop through the media's open files.  */
    open_count =  media_ptr -> fx_media_opened_file_count;
    file_ptr =    media_ptr -> fx_media_opened_file_list;
    while (open_count)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions