You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thumbs up for the lovely cosmopolitan libc, I'm using it almost daily!
I was trying to compile openssh-client (9.9, but I tried an older one, too). With a few minor tweaks of the source code, the compilation succeeds. The resulting binary, however, claims to be unable to parse the remote's version string and yields errors such as:
Bad remote protocol version identification: 'SSH-2.0-OpenSSH_9.9'
banner exchange: Connection to 1.2.3.4 port 22: invalid format
The reasons is that in the function kex_exchange_identification in kex.c of openssh, the function sscanf is used with a conversion specifier [ to parse the version string:
This use of sscanf is mandated in POSIX, so we should also have it.
Before I start warming up my C compiler and preparing a merge request: Do we want this functionality in cosmopolitan libc? Is it somewhere on the roadmap already? Should I indeed try to implement it myself? I estimate it's two or three dozens lines, but I'm not quite sure which infrastructure exists in libc/stdio/vcscanf.c since I haven't studied it properly yet.
Version
cosmocc (GCC) 14.1.0
What operating system are you seeing the problem on?
Linux
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Contact Details
adler@openhardware.de
What happened?
Thumbs up for the lovely cosmopolitan libc, I'm using it almost daily!
I was trying to compile
openssh-client
(9.9, but I tried an older one, too). With a few minor tweaks of the source code, the compilation succeeds. The resulting binary, however, claims to be unable to parse the remote's version string and yields errors such as:The reasons is that in the function
kex_exchange_identification
inkex.c
ofopenssh
, the functionsscanf
is used with a conversion specifier[
to parse the version string:This use of
sscanf
is mandated in POSIX, so we should also have it.Before I start warming up my C compiler and preparing a merge request: Do we want this functionality in cosmopolitan libc? Is it somewhere on the roadmap already? Should I indeed try to implement it myself? I estimate it's two or three dozens lines, but I'm not quite sure which infrastructure exists in
libc/stdio/vcscanf.c
since I haven't studied it properly yet.Version
cosmocc (GCC) 14.1.0
What operating system are you seeing the problem on?
Linux
Relevant log output
No response
The text was updated successfully, but these errors were encountered: