diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-07-08 04:55:04 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-07-08 04:55:04 +0000 |
commit | 1cd7850184584f241033fc5c4a3ee2357a74065f (patch) | |
tree | 825bdaf90073ed354b7621124144877647b610b0 /toolchain | |
parent | e1412180263cb60e277a73ceb80f8776c25a0940 (diff) | |
download | upstream-1cd7850184584f241033fc5c4a3ee2357a74065f.tar.gz upstream-1cd7850184584f241033fc5c4a3ee2357a74065f.tar.bz2 upstream-1cd7850184584f241033fc5c4a3ee2357a74065f.zip |
nvram: fix "Segmentation fault" caused by setting memory out of buffer
Some MTD partitions with NVRAM have content starting in the middle. In
such case offset is set and nvram_header returns pointer to the middle.
It means we have to respect offset when calculating remaining space.
By the way use real MTD partition size (nvram_part_size variable) as we
may want to bump NVRAM_SPACE in the (very near) future.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Backport of r46251
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@46258 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
0 files changed, 0 insertions, 0 deletions