]> sigrok.org Git - libsigrok.git/commit
rs9lcd: Fix segfault with unusual modes.
authorAlexandru Gagniuc <redacted>
Tue, 25 Dec 2012 22:21:24 +0000 (16:21 -0600)
committerUwe Hermann <redacted>
Tue, 25 Dec 2012 22:43:30 +0000 (23:43 +0100)
commit47eda193b2ce105ce50ddd284c99d813dacc49a7
tree39fabb7f5017e979f12364c97f50e8f28daa99c0
parent0853d5e627cc8ec493e52197fc8e9b3175701128
rs9lcd: Fix segfault with unusual modes.

Some unusual modes required re-parsing the value. Instead of assigning the
re-parsed value to *floatval, it was reassigned directly to *analog->data;
however, analog->data is not initialized at this point, causing a segfault.
This situation was created when moving the radioshack-dmm code to serial-dmm,
with the segfault not being observed at that time.

Do not write directly to analog->data, but instead use the intermediate
variable rawval.

Signed-off-by: Alexandru Gagniuc <redacted>
hardware/common/dmm/rs9lcd.c