myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit a740cfb4630a32390c9c7fbef56f9df5a43aca44
parent 1b1e75c15550227a6ac1eb0737865262d042543f
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Sat, 23 Apr 2016 19:39:22 +0200

Check mode name len in newaview().

Diffstat:
Mmyadm.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/myadm.c b/myadm.c @@ -600,7 +600,7 @@ newaview(const char *name, void (*func)(void)) { v = ecalloc(1, sizeof(View)); v->mode = ecalloc(1, sizeof(Mode)); v->choice = getitem(0); - strcpy(v->mode->name, name); + strncpy(v->mode->name, name, sizeof v->mode->name); v->mode->func = func; attach(v); return v;