diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-07 00:02:55 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-07 00:02:55 -0500 |
commit | e1cc30c83276f4eb52e84777693445443734a878 (patch) | |
tree | 217bf60258022d18dfd9e66ec36e71f4cdf01a12 /src | |
parent | 3aa979db127d362bb84ccab86c0f13185a34e9fa (diff) |
Don't walk off the end of the payload array.
Diffstat (limited to 'src')
-rw-r--r-- | src/obd2/obd2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/obd2/obd2.c b/src/obd2/obd2.c index 93cb8883..73e13b2f 100644 --- a/src/obd2/obd2.c +++ b/src/obd2/obd2.c @@ -58,7 +58,7 @@ DiagnosticRequestHandle diagnostic_request(DiagnosticShims* shims, 1 + request->payload_length + request->pid_length, NULL); if(shims->log != NULL) { - shims->log("Sending diagnostic request: arb_id: 0x%02x, mode: 0x%x, pid: 0x%x, payload: 0x%02x%02x%02x%02x%02x%02x%02x%02x, size: %d\r\n", + shims->log("Sending diagnostic request: arb_id: 0x%02x, mode: 0x%x, pid: 0x%x, payload: 0x%02x%02x%02x%02x%02x%02x%02x, size: %d\r\n", request->arbitration_id, request->mode, request->pid, @@ -69,7 +69,6 @@ DiagnosticRequestHandle diagnostic_request(DiagnosticShims* shims, request->payload[4], request->payload[5], request->payload[6], - request->payload[7], request->payload_length); } |