projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad3ec0d
)
libs/web: add missing byteswap of index offset when parsing index offset of lmo files
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 26 Jan 2013 19:57:18 +0000
(19:57 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 26 Jan 2013 19:57:18 +0000
(19:57 +0000)
libs/web/src/template_lmo.c
patch
|
blob
|
history
diff --git
a/libs/web/src/template_lmo.c
b/libs/web/src/template_lmo.c
index 7fcd2cda1f60b8e3d34c83b971965d28f3bbddbb..164999e880cb1ef54370fe87d317d2312e15db34 100644
(file)
--- a/
libs/web/src/template_lmo.c
+++ b/
libs/web/src/template_lmo.c
@@
-123,8
+123,8
@@
lmo_archive_t * lmo_open(const char *file)
if ((ar->mmap = mmap(NULL, ar->size, PROT_READ, MAP_SHARED, ar->fd, 0)) == MAP_FAILED)
goto err;
- idx_offset = *((const uint32_t *)
-
(ar->mmap + ar->size - sizeof(uint32_t
)));
+ idx_offset =
ntohl(
*((const uint32_t *)
+
(ar->mmap + ar->size - sizeof(uint32_t)
)));
if (idx_offset >= ar->size)
goto err;