summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhaskar <niceguy108@gmail.com>2013-05-22 22:53:36 +0530
committerHarald Welte <laforge@gnumonks.org>2013-05-23 07:44:50 +0200
commit78bcbd6cdbec2498125debefc41e23c1564b0fa5 (patch)
tree64fe739aa72dbb97587e287cd20507881035215c
parent7684cdd20c2363f73bfefe1ef3095f31947bbeb4 (diff)
osmoload: Fix fall-out from msgb_get() / msgb_pull() transition
Bugfix in Osmoload.c: Assigning correct value to data pointer in LOADER_MEM_READ. Wrong value was introduced in last update when msgb_get() was replaced by msgb_pull() which returns end of data instead of start of data.
-rw-r--r--src/host/osmocon/osmoload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c
index 9b64935..e83f98a 100644
--- a/src/host/osmocon/osmoload.c
+++ b/src/host/osmocon/osmoload.c
@@ -307,7 +307,7 @@ loader_handle_reply(struct msgb *msg) {
length = msgb_pull_u8(msg);
crc = msgb_pull_u16(msg);
address = msgb_pull_u32(msg);
- data = msgb_pull(msg, length);
+ data = msgb_pull(msg, length) - length;
break;
case LOADER_MEM_WRITE:
length = msgb_pull_u8(msg);