From 7793a2546dc9da89e4ec25e836b705478425d395 Mon Sep 17 00:00:00 2001 From: tick Date: Wed, 5 Dec 2007 03:10:40 +0000 Subject: gsmd: decrease the rx_len for memcpy (Andrzej Zaborowski) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3567 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/libgsmd/libgsmd_passthrough.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libgsmd/libgsmd_passthrough.c b/src/libgsmd/libgsmd_passthrough.c index 18045d1..d40f652 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)-1] = 0; + rx[--*rx_len] = 0; if (rgmh->len < *rx_len) *rx_len = rgmh->len; memcpy(rx, rx_buf, *rx_len); -- cgit v1.2.3