Commit graph

10 commits

Author SHA1 Message Date
Brian Ashworth 863914ec95 Switch to using a function to parse booleans 2018-07-23 21:33:17 -04:00
Ian Fan 23c1c26c3f Add get_config message type to ipc 2018-07-10 12:37:37 +01:00
emersion 63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
Dominique Martinet a2354d5992 cmd_background: fix leak on error
Found through static analysis.
2018-07-02 08:03:41 +09:00
Dominique Martinet ab18740529 output commands: move !argc checks after argc gets decremented
Found through static analysis.
2018-07-02 08:03:41 +09:00
ael-code a4578815f1
cleanup output-background subcommand handling
- fixes a double-free error when access() failed.

- refactor code to make memory managment (alloc/free) more straightforward
   - do not bring the temporary wordexp_t struct around
   - do not postpone errors handling
2018-06-26 15:40:32 +02:00
ael-code 4550cb2b3e
fix memleak on background cmd error
- src must be free after join_args()
- wordfree must bee used after wordexp
2018-06-26 15:37:39 +02:00
ael-code ad085c1332
bugfix: avoid access after free
if src is NULL due to a previous error we cannot use it in the command
result string.

Moreover if `src` points to `p.we_wordv[0]` we cannot use it after
`wordfree(&p)` in the command result string.

Bonus feature: If there was an error accessing the file, the string
rapresentation of the error is now included in the command result
string.
2018-06-22 15:41:44 +02:00
Brian Ashworth 51fa988be9 Address review comments for output subcommands 2018-06-03 10:29:00 -04:00
Brian Ashworth 5ea4a4d3ee Refactor cmd_output to use config_subcommand 2018-06-03 10:26:06 -04:00