File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,14 +57,14 @@ atob = (s) ->
5757 i = 0
5858 if s .length > 1 and s[i] == ' 0'
5959 if s[i+ 1 ] == ' x' or s[i+ 1 ] == ' X'
60- i += 2
60+ i += 2
6161 base = 16
62- else if ' 0' <= s[i+ 1 ] and s[i+ 1 ] <= ' 7 '
62+ else if ' 0' <= s[i+ 1 ] and s[i+ 1 ] <= ' 9 '
6363 i++
6464 base = 8
6565 dmax = ' 7'
6666 start = i
67- while s .length > 0
67+ while i < s .length
6868 if ' 0' <= s[i] and s[i] <= dmax
6969 n = (n* base + (chr (s[i])- chr0)) >>> 0
7070 else if base == 16
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ vows.describe('Invalid IP format')
4242 ' 1.2.3.4 ' : shouldFailWithError ' Invalid net'
4343 ' 1 .2.3.4' : shouldFailWithError ' Invalid net'
4444 ' 018.0.0.0' : shouldFailWithError ' Invalid net'
45+ ' 08.0.0.0' : shouldFailWithError ' Invalid net'
4546 ' 0xfg.0.0.0' : shouldFailWithError ' Invalid net'
4647 .export (module )
4748
You can’t perform that action at this time.
0 commit comments