@@ -5,12 +5,11 @@ var crypto = require('crypto');
55
66const INTERESTING8 = new Uint8Array ( [ - 128 , - 1 , 0 , 1 , 16 , 32 , 64 , 100 , 127 ] ) ;
77const INTERESTING16 = new Uint16Array ( [ - 32768 , - 129 , 128 , 255 , 256 , 512 , 1000 , 1024 , 4096 , 32767 , - 128 , - 1 , 0 , 1 , 16 , 32 , 64 , 100 , 127 ] ) ;
8- const INTERESTING32 = new Uint32Array ( [ - 2147483648 , - 100663046 , - 32769 , 32768 , 65535 , 65536 , 100663045 , 2147483647 , - 32768 , - 129 , 128 , 255 , 256 , 512 , 1000 , 1024 , 4096 , 32767 ] ) ;
8+ const INTERESTING32 = new Uint32Array ( [ - 2147483648 , - 100663046 , - 32769 , 32768 , 65535 , 65536 , 100663045 , 2147483647 , - 32768 , - 129 , 128 , 255 , 256 , 512 , 1000 , 1024 , 4096 , 32767 , - 128 , - 1 , 0 , 1 , 16 , 32 , 64 , 100 , 127 ] ) ;
99
1010
1111export class Corpus {
1212 private inputs : Buffer [ ] ;
13- private seedPath : string | undefined ;
1413 private corpusPath : string | undefined ;
1514 private maxInputSize : number ;
1615 private seedLength : number ;
@@ -295,7 +294,7 @@ export class Corpus {
295294 i -- ;
296295 continue ;
297296 }
298- const other = this . inputs [ this . rand ( this . inputs . length ) ]
297+ const other = this . inputs [ this . rand ( this . inputs . length ) ] ;
299298 if ( other . length < 4 ) {
300299 i -- ;
301300 continue ;
@@ -331,7 +330,7 @@ export class Corpus {
331330 const pos0 = this . rand ( res . length + 1 ) ;
332331 const pos1 = this . rand ( other . length - 2 ) ;
333332 const n = this . chooseLen ( other . length - pos1 - 2 ) + 2 ;
334- res = Buffer . concat ( [ res , Buffer . alloc ( n , 0 ) ] , res . length + n )
333+ res = Buffer . concat ( [ res , Buffer . alloc ( n , 0 ) ] , res . length + n ) ;
335334 res . copy ( res , pos0 + n , pos0 ) ;
336335 for ( let k = 0 ; k < n ; k ++ ) {
337336 res [ pos0 + k ] = other [ pos1 + k ]
0 commit comments