Ask Your Question

How to deactivate the warning "Trailing stray characters"?

asked 2020-03-24 09:53:55 +0000

Tagoria gravatar image

The title says everything, how can i deactivate this warning?

edit retag flag offensive close merge delete


Can you add some context to your question?

grahamb gravatar imagegrahamb ( 2020-03-24 11:10:35 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-24 14:30:59 +0000

Chuckc gravatar image

is checking for characters after a null ("\0") character which is the normal end of string.
Doesn't appear that it can be disabled:

/* "String Errors" isn't really a protocol, it's an error indication;
    disabling them makes no sense. */
edit flag offensive delete link more


Technically i totally agree that it makes no sense to disable it, but I'm using WireShark to protocol a development for our customer. There are a lot of reviewers that will go through the project documentation and they all see "yellow" marked parts with "Traling Stray Characters". I want to prevent that all these reviewer, an i guess they don't know what this messages mean, see that yellow marked packages. This wil automatically indicate something like "there is something not ok". From that point of view it makes sense :-) But as i understand, it is not possible.

Tagoria gravatar imageTagoria ( 2020-03-24 14:54:15 +0000 )edit

Have you looked at changing the Severity of the messages?

Chuckc gravatar imageChuckc ( 2020-03-24 15:04:30 +0000 )edit

So does your protocol have counted strings, null-terminated strings, null-padded strings, or strings that are both counted and null-terminated?

Guy Harris gravatar imageGuy Harris ( 2020-03-24 18:27:48 +0000 )edit

Why not sanitise your protocol, cleaning the string buffer tails before sending the packets, preventing leaking data? The warning is there for a (that) reason. If you can make the case that such side channel leaks are not a problem, explain that to the reviewers.

Jaap gravatar imageJaap ( 2020-03-24 18:36:25 +0000 )edit

@Guy Harris Yes, the customer protocol has null-terminated strings, counted and checksum after that.

@Jaap As i wrote, it is a customer protocol and it is not changeable at current project status.

Tagoria gravatar imageTagoria ( 2020-07-08 08:51:05 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-03-24 09:53:55 +0000

Seen: 1,251 times

Last updated: Jul 08 '20