Skip to content
Snippets Groups Projects
Commit cb7819dc authored by rswindell's avatar rswindell
Browse files

Sanitize the 'cfg' value read from *.subs (ignore garbage/unused bits).

parent 53e05445
No related branches found
No related tags found
No related merge requests found
......@@ -3064,6 +3064,7 @@ BOOL DLLCALL getmsgptrs(scfg_t* cfg, user_t* user, subscan_t* subscan, void (*pr
subscan[i].ptr = iniGetLongInt(keys, NULL, "ptr" , subscan[i].ptr);
subscan[i].last = iniGetLongInt(keys, NULL, "last" , subscan[i].last);
subscan[i].cfg = iniGetShortInt(keys, NULL, "cfg" , subscan[i].cfg);
subscan[i].cfg &= (SUB_CFG_NSCAN|SUB_CFG_SSCAN|SUB_CFG_YSCAN); // Sanitize the 'cfg' value
subscan[i].sav_ptr = subscan[i].ptr;
subscan[i].sav_last = subscan[i].last;
subscan[i].sav_cfg = subscan[i].cfg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment