Test Execution Status | Statistics |
---|---|
Passed | 0.000% (0/10) |
Incident | 0.000% (0/10) |
Skipped | 0.000% (0/10) |
Failed | 0.000% (0/10) |
Requires Manual Checking | 0.000% (0/10) |
Unknown | 0.000% (0/10) |
All | 0.000% (0/10) |
Category | Removed Lines | Inserted Lines | Total |
---|---|---|---|
Modified lines executed: | 0.000% (0/4) | 0.000% (0/10) | 0.000% (0/14) |
Modified lines not executed: | 75.000% (3/4) | 80.000% (8/10) | 78.571% (11/14) |
Source code lines not instrumented: | 25.000% (1/4) | 20.000% (2/10) | 21.429% (3/14) |
Execution Name | State |
---|
Line | Tests | Difference Output |
---|---|---|
diff --git a/authfile.c b/authfile.c | ||
index be4a5773..b1c92f4a 100644 | ||
--- a/authfile.c | ||
+++ b/authfile.c | ||
@@ -1,4 +1,4 @@ | ||
1 | - No equivalent source code line in the reference code can be identified. | -/* $OpenBSD: authfile.c,v 1.130 2018/07/09 21:59:10 markus Exp $ */ |
1 | - | +/* $OpenBSD: authfile.c,v 1.131 2018/09/21 12:20:12 djm Exp $ */ |
2 | /* | |
3 | * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. | |
4 | * | |
@@ -459,6 +459,8 @@ sshkey_in_file(struct sshkey *key, const char *filename, int strict_type, | ||
459 | return SSH_ERR_SYSTEM_ERROR; | |
460 | ||
461 | while (getline(&line, &linesize, f) != -1) { | |
462 | 0 | + sshkey_free(pub); |
463 | 0 | + pub = NULL; |
462 ➡ 464 | cp = line; | |
463 ➡ 465 | ||
464 ➡ 466 | /* Skip leading whitespace. */ | |
@@ -477,16 +479,20 @@ sshkey_in_file(struct sshkey *key, const char *filename, int strict_type, | ||
477 ➡ 479 | r = SSH_ERR_ALLOC_FAIL; | |
478 ➡ 480 | goto out; | |
479 ➡ 481 | } | |
480 | 0 | - if ((r = sshkey_read(pub, &cp)) != 0) |
482 | 0 | + switch (r = sshkey_read(pub, &cp)) { |
483 | 0 | + case 0: |
484 | 0 | + break; |
485 | 0 | + case SSH_ERR_KEY_LENGTH: |
486 | 0 | + continue; |
487 | 0 | + default: |
481 ➡ 488 | goto out; | |
489 | - | + } |
482 ➡ 490 | if (sshkey_compare(key, pub) || | |
483 ➡ 491 | (check_ca && sshkey_is_cert(key) && | |
484 ➡ 492 | sshkey_compare(key->cert->signature_key, pub))) { | |
485 ➡ 493 | r = 0; | |
486 ➡ 494 | goto out; | |
487 ➡ 495 | } | |
488 | 0 | - sshkey_free(pub); |
489 | 0 | - pub = NULL; |
490 ➡ 496 | } | |
491 ➡ 497 | r = SSH_ERR_KEY_NOT_FOUND; | |
492 ➡ 498 | out: |