summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
commit1b816ea846aca3ee89e7995373ace609e9518424 (patch)
treeb41cdc8495cae7fa9c2e0f98a5f2e71656b61f9a /match.c
parentfa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (diff)
parent086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff)
import openssh-4.6p1-gsskex-20070312.patch
Diffstat (limited to 'match.c')
-rw-r--r--match.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/match.c b/match.c
index 29fb7dab9..e3c993073 100644
--- a/match.c
+++ b/match.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: match.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,10 +36,14 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: match.c,v 1.20 2005/06/17 02:44:32 djm Exp $");
39 39
40#include "match.h" 40#include <sys/types.h>
41
42#include <ctype.h>
43#include <string.h>
44
41#include "xmalloc.h" 45#include "xmalloc.h"
46#include "match.h"
42 47
43/* 48/*
44 * Returns true if the given string matches the pattern (which may contain ? 49 * Returns true if the given string matches the pattern (which may contain ?
@@ -136,7 +141,7 @@ match_pattern_list(const char *string, const char *pattern, u_int len,
136 i < len && subi < sizeof(sub) - 1 && pattern[i] != ','; 141 i < len && subi < sizeof(sub) - 1 && pattern[i] != ',';
137 subi++, i++) 142 subi++, i++)
138 sub[subi] = dolower && isupper(pattern[i]) ? 143 sub[subi] = dolower && isupper(pattern[i]) ?
139 tolower(pattern[i]) : pattern[i]; 144 (char)tolower(pattern[i]) : pattern[i];
140 /* If subpattern too long, return failure (no match). */ 145 /* If subpattern too long, return failure (no match). */
141 if (subi >= sizeof(sub) - 1) 146 if (subi >= sizeof(sub) - 1)
142 return 0; 147 return 0;