top: Check i when setting Curwin in config_file().
Otherwise it leads to out-of-bounds reads (and maybe writes).
This commit is contained in:
parent
b45c4803dd
commit
bd91bbf7f1
@ -3689,6 +3689,8 @@ static const char *config_file (FILE *fp, const char *name, float *delay) {
|
||||
if (Rc.id < 'a' || Rc.id > RCF_VERSION_ID)
|
||||
return p;
|
||||
// you saw that, right? (fscanf stickin' it to 'i')
|
||||
if (i < 0 || i >= GROUPSMAX)
|
||||
return p;
|
||||
Curwin = &Winstk[i];
|
||||
// this may be ugly, but it keeps us locale independent...
|
||||
*delay = (float)tmp_whole + (float)tmp_fract / 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user