Skip to content

RFC: Comprehensive code review and improvements #48

@Alhkxsj

Description

@Alhkxsj

Hi PCManFM team,

I've been studying the PCManFM codebase recently and found some areas that could be improved.
Before I start making changes, I'd like to discuss this with you and hear your suggestions.

Issues Found

Security issues:

  1. Signal handler exits without cleanup (src/pcmanfm.c:140-141)
  2. Socket file in /tmp may have insufficient permissions (src/single-inst.c:343-349)
  3. Some places missing NULL checks
  4. Possible buffer overflow risks (src/single-inst.c:412, 426-430)

Code quality:

  1. Multiple memory leaks
  2. Code style is somewhat inconsistent
  3. Build system is a bit outdated (still using automake 1.10+)
  4. No static analysis tools integrated

Optimization:

  1. Performance could be improved (e.g., adding caching, reducing sync operations)
  2. Consider removing GTK+ 2 support
  3. Some functions are quite long

Questions I'd like to ask

  1. Which issues do you think I should start with?
  2. Would you prefer smaller PRs or larger ones?
  3. Are there any backward compatibility concerns I should be aware of?
  4. Should I add test cases?

Things I'd like to help with

  • Fix bugs
  • Clean up code
  • Add tests
  • Update documentation

Thank you very much for maintaining this project, I hope I can help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions