_  _    __    ___  __    ___  _____  _  _
 ( \( )  /__\  / __)(  )  / __)(  _  )( \( )
  )  (  /(__)\( (__  )(__( (__  )(_)(  )  (
 (_)\_)(__)(__)\___)(____)\___)(_____)(_)\_)

The History of Hacking  ·  May 31 – June 2, 2026  ·  Carolina Beach, NC

Connect from your terminal: telnet naclconbbs.net 23  |  ssh naclconbbs.net -p 2222

  • src/xpdev/sockwrap.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat May 2 18:58:15 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9bb6aa39080f6af5c62a2166
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    sockwrap: preserve WSAGetLastError() across socket_strerror()

    On Windows, FormatMessageA() shares its TLS slot with WSAGetLastError(),
    and calls SetLastError(ERROR_INSUFFICIENT_BUFFER) on a too-small buffer. Callers that reference SOCKET_ERRNO and SOCKET_STRERROR in the same printf-style call (e.g. main.cpp:2745, telgate.cpp:433) can therefore
    see a bogus normalized error code (e.g. -9878 from 122-WSABASEERR) when argument-evaluation order puts the SOCKET_STRERROR call first and the underlying message overflows the caller's buffer.

    Snapshot WSAGetLastError() at function entry and restore it before
    returning so the side-effect cannot leak.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net