Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1363055

[PATCH] ASN.1: fix open failure check on headername

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] ASN.1: fix open failure check on headername
Date 2016-03-22 23:40 +0100
Message-ID <rfD7X-2AF-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

The check for a failed open on headername is incorrectly checking
on the out FILE pointer rather than the hdr. Fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 scripts/asn1_compiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c
index e000f44..c1b7ef3 100644
--- a/scripts/asn1_compiler.c
+++ b/scripts/asn1_compiler.c
@@ -650,7 +650,7 @@ int main(int argc, char **argv)
 	}
 
 	hdr = fopen(headername, "w");
-	if (!out) {
+	if (!hdr) {
 		perror(headername);
 		exit(1);
 	}
-- 
2.7.3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] ASN.1: fix open failure check on headername Colin King <colin.king@canonical.com> - 2016-03-22 23:40 +0100

csiph-web