diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2019-11-13 05:42:26 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-11-15 08:50:10 +1100 |
commit | 40598b85d72a509566b7b2a6d57676c7231fed34 (patch) | |
tree | 8185521187c4d05581c68cc496c159306c8bd5bd | |
parent | 72687c8e7c38736e3e64e833ee7aa8f9cd9efed1 (diff) |
upstream: remove size_t gl_pathc < 0 test, it is invalid. the
return value from glob() is sufficient. discussed with djm
OpenBSD-Commit-ID: c91203322db9caaf7efaf5ae90c794a91070be3c
-rw-r--r-- | readconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c index b7a1caa11..66fb0d2bb 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.c,v 1.312 2019/11/13 04:47:52 deraadt Exp $ */ | 1 | /* $OpenBSD: readconf.c,v 1.313 2019/11/13 05:42:26 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1559,12 +1559,12 @@ parse_keytypes: | |||
1559 | "files",filename, linenum, arg2); | 1559 | "files",filename, linenum, arg2); |
1560 | free(arg2); | 1560 | free(arg2); |
1561 | continue; | 1561 | continue; |
1562 | } else if (r != 0 || gl.gl_pathc < 0) | 1562 | } else if (r != 0) |
1563 | fatal("%.200s line %d: glob failed for %s.", | 1563 | fatal("%.200s line %d: glob failed for %s.", |
1564 | filename, linenum, arg2); | 1564 | filename, linenum, arg2); |
1565 | free(arg2); | 1565 | free(arg2); |
1566 | oactive = *activep; | 1566 | oactive = *activep; |
1567 | for (i = 0; i < (u_int)gl.gl_pathc; i++) { | 1567 | for (i = 0; i < gl.gl_pathc; i++) { |
1568 | debug3("%.200s line %d: Including file %s " | 1568 | debug3("%.200s line %d: Including file %s " |
1569 | "depth %d%s", filename, linenum, | 1569 | "depth %d%s", filename, linenum, |
1570 | gl.gl_pathv[i], depth, | 1570 | gl.gl_pathv[i], depth, |