lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Jun 2011 14:49:27 +0200
From:	Petr Sabata <contyk@...hat.com>
To:	netdev@...r.kernel.org
Cc:	Petr Sabata <contyk@...hat.com>
Subject: [PATCH] iproute2: Check getline() return code correctly

The current implementation is always false, no matter what happens.

Signed-off-by: Petr Sabata <contyk@...hat.com>
---
 lib/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/utils.c b/lib/utils.c
index 1b42222..76cadea 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -702,7 +702,7 @@ ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
 		size_t len1 = 0;
 		size_t cc1;
 
-		if ((cc1 = getline(&line1, &len1, in)) < 0) {
+		if ((cc1 = getline(&line1, &len1, in)) == (size_t)-1) {
 			fprintf(stderr, "Missing continuation line\n");
 			return cc1;
 		}
-- 
1.7.5.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ