From 9c99414523af7b93003f5765091808729e590dcb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 30 Dec 2001 03:00:31 +0000 Subject: 2001-12-29 Roland McGrath * nbd.c (nbdopen): Fix in last change. --- libstore/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstore') diff --git a/libstore/nbd.c b/libstore/nbd.c index 9130db43..547d3bd6 100644 --- a/libstore/nbd.c +++ b/libstore/nbd.c @@ -325,7 +325,7 @@ nbdopen (const char *name, int *mod_flags, ofs += cc; } while (cc > 0 && ofs < sizeof ns); - if (cc < sizeof ns + if (ofs != sizeof ns || memcmp (ns.magic, NBD_INIT_MAGIC, sizeof ns.magic) != 0) { close (sock); -- cgit v1.2.3