summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-window-info.c
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2022-11-23 19:49:06 +0100
committerLuke from DC <[email protected]>2022-12-23 11:01:23 +0000
commit26adade4d1fd1ff510d9f0dfa5abc576a68e6519 (patch)
tree792f8de0794ccc2b4c432adebc4f742fb2eabb34 /libcaja-private/caja-window-info.c
parent333e2728dbebb12110fc9b2c821089eb372ee14e (diff)
downloadcaja-26adade4d1fd1ff510d9f0dfa5abc576a68e6519.tar.bz2
caja-26adade4d1fd1ff510d9f0dfa5abc576a68e6519.tar.xz
Fix handling of invalid x-special/mate-icon-list drops
`p` actually could never be `0` (because of the NULL check on the `memchr()` call), but the intended behavior is `*p == '\0'`: the containing condition checks for either a truncated data (`*p == '\0'`) or no geometry information (`*p == '\n'`). I replaced the check to be `*p != '\n'` instead of `*p == '\0'` to make this more robust as the actual issue is anything but a newline, the fact it can only be a NUL otherwise is incidental to the enclosing check, but not really relevant at this level. This is also in line with the actual error message. Found by cppcheck: https://caja.mate-desktop.dev/2022-11-23-174623-5790-cppcheck@ae663c369cf2_desktop-no-overflow/16.html#line-204
Diffstat (limited to 'libcaja-private/caja-window-info.c')
0 files changed, 0 insertions, 0 deletions