Skip to content

Commit

Permalink
Don't pass uninitialized memory to the kernel
Browse files Browse the repository at this point in the history
Found by Clang.
  • Loading branch information
mptre committed Apr 11, 2017
1 parent 618a490 commit fd824f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/pick-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ child(int master, int slave)
* Set window size to known dimensions, necessary in order to deduce
* when scrolling should occur.
*/
memset(&ws, 0, sizeof(ws));
ws.ws_col = 80, ws.ws_row = 24;
if (ioctl(slave, TIOCSWINSZ, &ws) == -1)
err(1, "TIOCSWINSZ");
Expand Down

0 comments on commit fd824f5

Please sign in to comment.