Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 09024119 in mainline


Ignore:
Timestamp:
2015-06-04T14:00:24Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
315b7e3
Parents:
022d72ff
Message:

fix possible NULL pointer derefence in answer_need_old() before a NULL check in sys_ipc_forward_common()
(reported by Coverity as CID 10450)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/sysipc.c

    r022d72ff r09024119  
    388388{
    389389        call_t *call = get_call(callid);
    390         phone_t *phone;
    391         bool need_old = answer_need_old(call);
    392         bool after_forward = false;
    393         ipc_data_t old;
    394         int rc;
    395 
    396390        if (!call)
    397391                return ENOENT;
    398 
     392       
     393        ipc_data_t old;
     394        bool need_old = answer_need_old(call);
    399395        if (need_old)
    400396                old = call->data;
     397       
     398        bool after_forward = false;
     399        int rc;
     400        phone_t *phone;
    401401       
    402402        if (phone_get(phoneid, &phone) != EOK) {
     
    409409                goto error;
    410410        }
    411 
     411       
    412412        call->flags |= IPC_CALL_FORWARDED;
    413413       
Note: See TracChangeset for help on using the changeset viewer.