X-Git-Url: https://ruderich.org/simon/gitweb/?p=nsscash%2Fnsscash.git;a=blobdiff_plain;f=passwd.go;h=1b4939c63ac6a1a9b2c634bdd0a74a2def5f0419;hp=c07e9c73914d378d8964756994542f92eeefb3b1;hb=d7eb5ee1a910303f38904e604aea9cf0b1372d7b;hpb=839f07d7b3130efc613d7d3fa8ed71a7d8d5fd7f diff --git a/passwd.go b/passwd.go index c07e9c7..1b4939c 100644 --- a/passwd.go +++ b/passwd.go @@ -191,7 +191,8 @@ func SerializePasswds(w io.Writer, pws []Passwd) error { } // Sanity check - if indexOrig.Len() != indexId.Len() || + if len(pws)*8 != indexOrig.Len() || + indexOrig.Len() != indexId.Len() || indexId.Len() != indexName.Len() { return fmt.Errorf("indexes have inconsistent length") }