View | Details | Raw Unified | Return to bug 2623
Collapse All | Expand All

(-)a/sshkey.c (-4 / +4 lines)
Lines 1269-1276 sshkey_read(struct sshkey *ret, char **cpp) Link Here
1269
	case KEY_ECDSA_CERT:
1269
	case KEY_ECDSA_CERT:
1270
	case KEY_RSA_CERT:
1270
	case KEY_RSA_CERT:
1271
	case KEY_ED25519_CERT:
1271
	case KEY_ED25519_CERT:
1272
		space = strchr(cp, ' ');
1272
		if ((space = strchr(cp, ' ')) == NULL ||
1273
		if (space == NULL)
1273
		    (space = strchr(cp, '\t')) == NULL)
1274
			return SSH_ERR_INVALID_FORMAT;
1274
			return SSH_ERR_INVALID_FORMAT;
1275
		*space = '\0';
1275
		*space = '\0';
1276
		type = sshkey_type_from_name(cp);
1276
		type = sshkey_type_from_name(cp);
Lines 1288-1295 sshkey_read(struct sshkey *ret, char **cpp) Link Here
1288
		if ((blob = sshbuf_new()) == NULL)
1288
		if ((blob = sshbuf_new()) == NULL)
1289
			return SSH_ERR_ALLOC_FAIL;
1289
			return SSH_ERR_ALLOC_FAIL;
1290
		/* trim comment */
1290
		/* trim comment */
1291
		space = strchr(cp, ' ');
1291
		if ((space = strchr(cp, ' ')) != NULL ||
1292
		if (space) {
1292
		    (space = strchr(cp, '\t')) != NULL) {
1293
			/* advance 'space': skip whitespace */
1293
			/* advance 'space': skip whitespace */
1294
			*space++ = '\0';
1294
			*space++ = '\0';
1295
			while (*space == ' ' || *space == '\t')
1295
			while (*space == ' ' || *space == '\t')

Return to bug 2623