[MM] [PATCH] port-probe: fix crash in serial_probe_at_parse_response due to NULL response
- From: Ben Chan <benchan chromium org>
- To: networkmanager-list gnome org
- Subject: [MM] [PATCH] port-probe: fix crash in serial_probe_at_parse_response due to NULL response
- Date: Wed, 11 Jul 2012 23:35:25 -0700
When the serial port is not open, internal_queue_command
(mm-serial-port.c) invokes serial_probe_at_parse_response
(mm-port-probe.c) with a NULL response. This patch modifies
serial_probe_at_parse_response to handle that properly.
---
src/mm-port-probe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c
index baadee0..c31affe 100644
--- a/src/mm-port-probe.c
+++ b/src/mm-port-probe.c
@@ -450,7 +450,7 @@ serial_probe_at_parse_response (MMAtSerialPort *port,
}
if (!task->at_commands->response_processor (task->at_commands->command,
- response->str,
+ (response) ? response->str : "",
!!task->at_commands[1].command,
error,
&result,
--
1.7.7.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]