Skip to content

Commit

Permalink
Prevent access to an uninitialized variable
Browse files Browse the repository at this point in the history
The "-h" option may access an uninitialized value. Prevent it
by properly initializing the value.

CID:	1006559


git-svn-id: svn+ssh://svn.freebsd.org/base/head@277979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
  • Loading branch information
pfg committed Jan 31, 2015
1 parent 2a3eec7 commit d35be1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/ps/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ main(int argc, char *argv[])
KINFO *kinfo = NULL, *next_KINFO;
KINFO_STR *ks;
struct varent *vent;
struct winsize ws;
struct winsize ws = { .ws_row = 0 };
const char *nlistf, *memf, *fmtstr, *str;
char *cols;
int all, ch, elem, flag, _fmt, i, lineno, linelen, left;
Expand Down

0 comments on commit d35be1b

Please sign in to comment.