]> granicus.if.org Git - procps-ng/commit
pgrep: prevent buffer overflow in opts
authorFilipe Brandenburger <filbranden@google.com>
Mon, 11 May 2015 18:40:50 +0000 (11:40 -0700)
committerCraig Small <csmall@enc.com.au>
Wed, 13 May 2015 12:04:58 +0000 (22:04 +1000)
commite566680254c81da686149a5b996c35f6e412281c
treeda68c28eb24313ca5dd685390c0d445a46e98c8c
parent2753a8f3db9c164a375c2013fd96606b571631ee
pgrep: prevent buffer overflow in opts

Recent commit 9742c74e7c522 ("pgrep: Enable case-insensitive process matching")
caused the "opts" string to overflow the show 32-character space allocated for
it.

Bump it up to 64 bytes, which should be enough even if more options are added.

Tested: Running ./pgrep stopped crashing and `make check` passed.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
pgrep.c