public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/6] Fix issues and false positives from static analysis
@ 2026-07-09 21:56 Jon Maloy
  2026-07-09 21:56 ` [PATCH v2 1/6] passt: Initialise listening socket fds to -1 Jon Maloy
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Jon Maloy @ 2026-07-09 21:56 UTC (permalink / raw)
  To: sbrivio, david, jmaloy, passt-dev

This series fixes minor issues found by static analysis tools in the
main passt code and in documentation examples.

The core code changes add missing fd initialisations and guard unsigned
arithmetic against potential underflow.
                                       
We also fix buffer handling, type mismatches, and resource leaks in
the documentation example code.

v2: - udp_vu, tap: Use if-guards instead of assert(), to handle the
      error paths properly and let the static checker follow the logic
    - doc/migration: Use snprintf() instead of strncpy() for clarity
      and guaranteed null-termination (David Gibson)
    - Drop va_list initialisation patch (Stefano Brivio, David Gibson)   

Jon Maloy (6):
  passt: Initialise listening socket fds to -1
  udp_vu: Check iov_tail_clone() return before assigning to msg_iovlen
  tap: Guard IPv6 tail size subtraction against underflow
  doc/migration: Use snprintf() for socket path and fix argv access
  doc/migration: Fix buffer type mismatch in recv() call
  doc/platform-requirements: Close leaked sockets in test_close_dup()

 doc/migration/source.c                    |  2 +-
 doc/migration/target.c                    | 10 ++++------
 doc/platform-requirements/udp-close-dup.c |  3 +++
 passt.c                                   |  3 +++
 tap.c                                     |  5 ++++-
 udp_vu.c                                  |  8 ++++++--
 6 files changed, 21 insertions(+), 10 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-10  1:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 21:56 [PATCH v2 0/6] Fix issues and false positives from static analysis Jon Maloy
2026-07-09 21:56 ` [PATCH v2 1/6] passt: Initialise listening socket fds to -1 Jon Maloy
2026-07-09 21:56 ` [PATCH v2 2/6] udp_vu: Check iov_tail_clone() return before assigning to msg_iovlen Jon Maloy
2026-07-10  1:32   ` David Gibson
2026-07-09 21:56 ` [PATCH v2 3/6] tap: Guard IPv6 tail size subtraction against underflow Jon Maloy
2026-07-10  1:36   ` David Gibson
2026-07-09 21:56 ` [PATCH v2 4/6] doc/migration: Use snprintf() for socket path and fix argv access Jon Maloy
2026-07-10  1:37   ` David Gibson
2026-07-09 21:56 ` [PATCH v2 5/6] doc/migration: Fix buffer type mismatch in recv() call Jon Maloy
2026-07-09 21:56 ` [PATCH v2 6/6] doc/platform-requirements: Close leaked sockets in test_close_dup() Jon Maloy

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).