Skip to content

NULL pointer dereference in archive app #1531

@xMasterX

Description

@xMasterX

Describe the bug.

Opening empty subfolder in archive app while being in application tab and pressing back causes crash

I done all testing using remote flipper connected by ssh screen streaming as I don't have my own
Two people verified same behaviour on latest dev build

If we open empty folder we don't reaching that check, it just went straight to NULL pointer crash, but we reaching that check if folder contains files with appropriate extension and if they are displayed

pic0

We getting next furi_crash happening in every exit situation, doesnt matter if folder Empty or not
pic1

So problem is located is somewhere else

I used furi_crash as "breakpoints" to find moment where we getting NULL pointer dereference, because i don't have continuous access to cli, and/or debug board/stlink

Reproduction

  1. Add empty sub-folder into any app folder like badusb, infrared
  2. Open Archive app
  3. Select tab with corresponding name BadUSB (if empty subfolder was added into that folder)
  4. Open subfolder and press back button
  5. Crash

Target

F7

Logs

38827 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 000137F4 open (/any/badusb)
38845 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 000137F4 closed
38847 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 free
38850 �[0;34m[D][BrowserWorker] �[0mEnter folder: /any/badusb items: 17 idx: -1
38854 �[0;34m[D][BrowserWorker] �[0mLoad offset: 0 cnt: 100
38858 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 alloc
38868 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 000137CC open (/any/badusb)
38891 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 000137CC closed
38895 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 free
41746 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 alloc
41753 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 00013824 open (/any/badusb/layouts)
41761 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 00013824 closed
41763 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 free
41766 �[0;34m[D][BrowserWorker] �[0mEnter folder: /any/badusb/layouts items: 0 idx: -1
41769 �[0;34m[D][BrowserWorker] �[0mLoad offset: 0 cnt: 100
41773 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 alloc
41788 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 000137D4 open (/any/badusb/layouts)
41802 �[0;35m[T][StorageAPI] �[0mDir 000127A8 - 000137D4 closed
41806 �[0;35m[T][StorageAPI] �[0mFile/Dir 000127A8 free

Anything else?

In logs that i provided layouts folder contains files with non .txt extension, in Archive app (in BadUSB tab) its considered as Empty - because it looks only for .txt files

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions