schmich / ward

Secure password manager
MIT License
4 stars 0 forks source link

Fix --max-length crash #26

Open schmich opened 8 years ago

schmich commented 8 years ago
> ward add --gen --max-length 15
Master password: 
Login: panic: CreateIvDomPart: to must be greater than from

goroutine 34 [running]:
panic(0x42dbde0, 0xc82027a020)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
bitbucket.org/gofd/gofd/core.CreateIvDomPart(0x1e, 0xf, 0x9000000000000)
    /Users/schmich/dev/work/src/bitbucket.org/gofd/gofd/core/ivdompart.go:19 +0x78
bitbucket.org/gofd/gofd/core.CreateIvDomainFromTo(0x1e, 0xf, 0xc820014420)
    /Users/schmich/dev/work/src/bitbucket.org/gofd/gofd/core/ivdomain.go:52 +0x87
bitbucket.org/gofd/gofd/core.CreateIntVarIvFromTo(0x438b5e8, 0x6, 0xc820016120, 0x1e, 0xf, 0xc820014360)
    /Users/schmich/dev/work/src/bitbucket.org/gofd/gofd/core/intvar.go:59 +0x57
bitbucket.org/gofd/gofd/core.CreateIntVarFromTo(0x438b5e8, 0x6, 0xc820016120, 0x1e, 0xf, 0x20)
    /Users/schmich/dev/work/src/bitbucket.org/gofd/gofd/core/intvar.go:52 +0x49
github.com/schmich/ward/passgen.(*Generator).Generate(0xc82000f140, 0x0, 0x0, 0x0, 0x0)
    /Users/schmich/dev/work/src/github.com/schmich/ward/passgen/passgen.go:238 +0x60b
main.(*App).runGen.func1(0xc82000f140, 0xc8200b81e0)
    /Users/schmich/dev/work/src/github.com/schmich/ward/ward/add.go:128 +0x25
created by main.(*App).runGen
    /Users/schmich/dev/work/src/github.com/schmich/ward/ward/add.go:130 +0xb5