marazmista / radeon-profile-daemon

Daemon for radeon-profile GUI
GNU General Public License v2.0
118 stars 23 forks source link

Check if all arguments used by each instruction are valid #8

Closed Danysan1 closed 7 years ago

Danysan1 commented 7 years ago

Without these fixes using rp-dev branch ( i think after https://github.com/marazmista/radeon-profile/commit/557aaa666ca245c53a1de46738ca0c8b168909af ) makes the daemon crash when the user checks/unchecks the "Use daemon as data provider" and closes the application. This is because it sends to the daemon 2#0##2#0##, a SIGNAL_SET_VALUE with empty path which gets discarded (in because in line 74 split() uses QString::SkipEmptyParts ) and so "2" is used as path (later rejected in setNewValue() as invalid) and the next instruction is interpreted as SIGNAL_CONFIG so the daemon proceeds to fetch the path, which has also been discarded as empty, and a segmentation fault occurs. NOTE: This only prevents radeon-profile-daemon from crashing. It is still necessary to fix radeon-profile, because the signal it sends is still malformed.

marazmista commented 7 years ago

Fixed here: https://github.com/marazmista/radeon-profile/commit/a9c944f35cc50d41cf76a0afc54e248e81d8d9c3 Signal should not has been sent in the first place, so additional checks in daemon are not necessary.

Danysan1 commented 7 years ago

Well, this would prevent crashes in case of other future errors in radeon profile... But, anyway, closing.

marazmista commented 7 years ago

Without crash, this bug would not be found so easily...

Danysan1 commented 7 years ago

Fair point