From: Jo-Philipp Wich Date: Fri, 8 Aug 2008 12:55:57 +0000 (+0000) Subject: * luci/libs: fix off-by-one bug in luci.ip X-Git-Tag: 0.8.0~494 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e502d88407b9ad17820f0a155dbce160346ced8c;p=oweals%2Fluci.git * luci/libs: fix off-by-one bug in luci.ip --- diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua index e6de08f1b..2fe71297d 100644 --- a/libs/core/luasrc/ip.lua +++ b/libs/core/luasrc/ip.lua @@ -333,7 +333,7 @@ function cidr.network( self, bits ) if #data < #self[2] then table.insert( data, bit.band( self[2][1+#data], __mask16(bits) ) ) - for i = #data, #self[2] do + for i = #data + 1, #self[2] do table.insert( data, 0 ) end end