openhpi2 / Open-HPI-base

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
0 stars 1 forks source link

oa_soap NULL dereference code paths #2502

Closed openhpi2 closed 8 years ago

openhpi2 commented 11 years ago

We have three instances of code like this: rdr = oh_get_rdr_by_type(oh_handler->rptcache, resource_id, SAHPI_SENSOR_RDR, OA_SOAP_SEN_TEMP_STATUS);

sensor_info = (struct oa_soap_sensor_info *)oh_get_rdr_data(oh_handler->rptcache, resource_id,rdr->RecordId);

The problem is that oh_get_rdr_by_type can potentially return NULL so we will crash with rdr->RecordId. We need to make this a bit more robust.

Instances:

Reported by: mbaldessari

openhpi2 commented 11 years ago

*_ATTENTION_** This account is disabled and is no longer accessed by the recipient. Please remove it from your address book.

Thanks

Original comment by: tariqx

openhpi2 commented 11 years ago

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Fixed in #7546

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Original comment by: dr_mohan