nsz32 / docklike-plugin

A Dock-like Taskbar Plugin for XFCE
GNU General Public License v3.0
334 stars 44 forks source link

[BUG] Crash on long Exec line #63

Closed smac89 closed 3 years ago

smac89 commented 3 years ago

I installed an application with a very long exec command line string (530 characters long), and immediately this plugin crashed.

I believe the issue is related to this function: https://github.com/nsz32/docklike-plugin/blob/65c38ec27122d01a869fdcd0d357e182f6d924de/src/Helpers.cpp#L83

nsz32 commented 3 years ago

Gimme that very long exec command line string (530 characters long) please

smac89 commented 3 years ago

Check it out:

https://github.com/Figma-Linux/figma-linux/blob/60d850b3d1894306d8cf4bc025f568575d8aa94e/resources/figma-linux.desktop#L4

nsz32 commented 3 years ago

That's a nice one for sure ! I will take some time to work on your issue and #49 tomorrow.

And also very nice project ! I think many has dreamed a DE this way ;)

nsz32 commented 3 years ago

I didn't viewed the body of the function you pointed me. Of course it was that :) Thanks for your feedback !

smac89 commented 3 years ago

And also very nice project ! I think many has dreamed a DE this way ;)

Oh 😄 Figma desktop is not actually a DE (Desktop Environment). Just another Electron wrapper around figma.com

I didn't viewed the body of the function you pointed me. Of course it was that :) Thanks for your feedback !

P.S. you may want to try strncpy instead of playing with buffer size. It's only a matter of time before someone finds this bug again.

On that note, where is basename defined? I was trying to find it, but couldn't.