https://bugzilla.mindrot.org/show_bug.cgi?id=3937

            Bug ID: 3937
           Summary: b16tod: does not accept B-F, due to a wrong comparison
           Product: Portable OpenSSH
           Version: 10.2p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: Miscellaneous
          Assignee: [email protected]
          Reporter: [email protected]

There is a trivial correctness bug in the sshbuf-misc.c:b16tod, which
should be fixed as follows:

```
diff --git a/sshbuf-misc.c b/sshbuf-misc.c
index 7b11e4e17..f15322eb3 100644
--- a/sshbuf-misc.c
+++ b/sshbuf-misc.c
@@ -95,7 +95,7 @@ b16tod(const char v)
                return v - '0';
        if (v >= 'a' && v <= 'f')
                return 10 + v - 'a';
-       if (v >= 'A' && v <= 'A')
+       if (v >= 'A' && v <= 'F')
                return 10 + v - 'A';
        return -1;
 }
```

With the current usage I don't see a bug manifesting from it.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to