diff options
author | pfg <pfg@FreeBSD.org> | 2015-01-31 15:41:01 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-01-31 15:41:01 +0000 |
commit | b59332f8aa23637128b59dbdaf0cb1129fde280b (patch) | |
tree | df698925fa0b78b32eb6894aa9fc1371c4764866 /bin/ps/ps.c | |
parent | 9fb7956fcabb654e35502323111b313875173304 (diff) | |
download | FreeBSD-src-b59332f8aa23637128b59dbdaf0cb1129fde280b.zip FreeBSD-src-b59332f8aa23637128b59dbdaf0cb1129fde280b.tar.gz |
Prevent access to an uninitialized variable
The "-h" option may access an uninitialized value. Prevent it
by properly initializing the value.
CID: 1006559
Diffstat (limited to 'bin/ps/ps.c')
-rw-r--r-- | bin/ps/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 9d14a72c..449367c 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -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; |