dhdutil: Fix issue with dhd_upload which causes kernel panic
Bug: 18608773
Change-Id: I6cc6a8a36c5ba386171bd7285d4d4729f44ad9e1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/bcmdhd/dhdutil/dhdu.c b/bcmdhd/dhdutil/dhdu.c
index 6b2007c..2c628c2 100644
--- a/bcmdhd/dhdutil/dhdu.c
+++ b/bcmdhd/dhdutil/dhdu.c
@@ -2154,7 +2154,7 @@
ramsize = *(uint32*)buf;
if (!ramsize)
- ramsize = start + size;
+ ramsize = size;
if ((fp = fopen(fname, "wb")) == NULL) {
fprintf(stderr, "%s: Could not open %s: %s\n",
@@ -2165,7 +2165,7 @@
/* default size to full RAM */
if (!size)
- size = ramsize - start;
+ size = ramsize;
/* read memory and write to file */
while (size) {