hessu/aprsc

Logging of dropped packets containing NUL bytes is broken

hessu opened this issue · 1 comments

The vsnprintf/snprintf functions used in hlog() stop string inclusion when a NUL is met. Thus, the logging of a dropped incoming packet stops at the first NUL, which can be confusing, especially if the packet is dropped because of the NUL.

Should translate binary characters to hex escapes.

Fixed in SHA: 5173a3f for version 1.8.3 or 1.9.0. Implemented hlog_packet which appends the format string with the contents of a packet. Packet contents are C escaped (hex escapes only, \xFF, and \ for ).