Skip to content
Snippets Groups Projects
Commit 6e91b377 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Handle getuserdat() failure in sbbs_t::change_user()

Address Coverity CID 551209
parent c5f547bf
No related branches found
No related tags found
No related merge requests found
......@@ -1349,8 +1349,12 @@ bool sbbs_t::change_user(const char* username)
, cfg.sub[usrsub[curgrp][cursub[curgrp]]]->code);
putuserstr(useron.number, USER_CURDIR
, cfg.dir[usrdir[curlib][curdir[curlib]]]->code);
user_t org_user = useron;
useron.number = i;
getuserdat(&cfg, &useron);
if (getuserdat(&cfg, &useron) != USER_SUCCESS) {
useron = org_user;
return false;
}
if (getnodedat(cfg.node_num, &thisnode, true)) {
thisnode.useron = useron.number;
putnodedat(cfg.node_num, &thisnode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment