comparison svr-authpubkeyoptions.c @ 546:568638be7203 agent-client

propagate from branch 'au.asn.ucc.matt.dropbear' (head 899a8851a5edf840b2f7925bcc26ffe99dcac54d) to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 6bbab8364de17bd9ecb1dee5ffb796e48c0380d2)
author Matt Johnston <matt@ucc.asn.au>
date Wed, 01 Jul 2009 04:16:32 +0000
parents 43bbe17d6ba0
children b321aeb57c64
comparison
equal deleted inserted replaced
500:d588e3ea557a 546:568638be7203
103 } 103 }
104 104
105 /* helper for svr_add_pubkey_options. returns DROPBEAR_SUCCESS if the option is matched, 105 /* helper for svr_add_pubkey_options. returns DROPBEAR_SUCCESS if the option is matched,
106 and increments the options_buf */ 106 and increments the options_buf */
107 static int match_option(buffer *options_buf, const char *opt_name) { 107 static int match_option(buffer *options_buf, const char *opt_name) {
108 const int len = strlen(opt_name); 108 const unsigned int len = strlen(opt_name);
109 if (options_buf->len - options_buf->pos < len) { 109 if (options_buf->len - options_buf->pos < len) {
110 return DROPBEAR_FAILURE; 110 return DROPBEAR_FAILURE;
111 } 111 }
112 if (strncasecmp(buf_getptr(options_buf, len), opt_name, len) == 0) { 112 if (strncasecmp(buf_getptr(options_buf, len), opt_name, len) == 0) {
113 buf_incrpos(options_buf, len); 113 buf_incrpos(options_buf, len);