summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-12-04 07:17:13 +0000
committertick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-12-04 07:17:13 +0000
commitab2d936a07d536935c6d447caa582a24caf89e32 (patch)
treef78831a92d601c65ba2b7dc4599a22ba93d9a5e0 /src
parentf09dc3e887bf0946975c1e78f01921827117ba50 (diff)
gsmd: libgsmd-tool will crash under atcmd mode (sean_chiang)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3556 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r--src/libgsmd/libgsmd_passthrough.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libgsmd/libgsmd_passthrough.c b/src/libgsmd/libgsmd_passthrough.c
index 1849688..18045d1 100644
--- a/src/libgsmd/libgsmd_passthrough.c
+++ b/src/libgsmd/libgsmd_passthrough.c
@@ -83,7 +83,7 @@ int lgsm_passthrough(struct lgsm_handle *lh, const char *tx,
if (rc < sizeof(*rgmh) + rgmh->len)
return -EINVAL;
- rx[*--rx_len] = 0;
+ rx[(*rx_len)-1] = 0;
if (rgmh->len < *rx_len)
*rx_len = rgmh->len;
memcpy(rx, rx_buf, *rx_len);
personal git repositories of Harald Welte. Your mileage may vary