nwserv: escape remaining protocol names in debug logs
All checks were successful
Source release / source-package (push) Successful in 45s

Use the bounded printable formatter for two remaining debug paths that can
log protocol-derived byte fields directly.

The SAP route suppression log can print SAP-derived server names, including
non-printable bytes advertised by newer NetWare service types.  The namespace
search diagnostic can also contain DOS wildcard bytes such as 0xff padding.

Format both fields through visable_data() so diagnostics stay readable and do
not emit raw control or high-bit bytes.

This is logging-only and does not change SAP, routing, or namespace behavior.
This commit is contained in:
Mario Fetka
2026-05-29 22:22:10 +02:00
parent 4bbec93f4f
commit 186630753f
2 changed files with 4 additions and 2 deletions

View File

@@ -1856,7 +1856,8 @@ int nw_search_file_dir(int namespace, int datastream,
}
XDPRINTF((5,0,"nw_s_f_d namsp=%d, sequence=%d, search='%s'",
namespace, sequence, entry ));
namespace, sequence,
visable_data(entry, sizeof(entry)) ));
if ( (!sequence) || (sequence != dsh->lastsequence)) {
XDPRINTF((5, 0, "dirpos set to 0 dsh->lastsequence = %d, dirpos=%d",

View File

@@ -555,7 +555,8 @@ static void send_sip_to_net(uint32 nd_net, int nd_ticks, int mode)
/* hops */
|| ( mode == 2 && nw->hops) ) { /* no SAP to this NET */
XDPRINTF((3, 0, "No SAP mode=%d, to net=0x%x for server '%s'",
mode, nd_net, nw->name));
mode, nd_net,
visable_data((uint8*)nw->name, MAX_SERVER_NAME)));
continue;
}