First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

it's ok to sizeof(nspr_hd_v20_t) or it should be sizeof(nspr_pktracefull_v20_t) ?

  • retag add tags

the commit is : https://code.wireshark.org/review/git...

case NSPR_RELTIME_V20:
                 {
+                    if (!nstrace_ensure_buflen(nstrace, nstrace_buf_offset, sizeof(nspr_hd_v20_t), err, err_info))
+                        return FALSE;
                     nspr_pktracefull_v20_t *fp20 = (nspr_pktracefull_v20_t *) &nstrace_buf[nstrace_buf_offset];
                     if (nspr_getv20recordsize((nspr_hd_v20_t *)fp20) == 0) {
                         *err = WTAP_ERR_BAD_FILE;

the type of varible which will be used next is "nspr_pktracefull_v20_t", so i think sizeof(nspr_pktracefull_v20_t) is better

eaglegai's avatar
1
eaglegai
asked 2020-01-10 12:01:49 +0000
grahamb's avatar
23.8k
grahamb
updated 2020-01-10 12:03:50 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Wireshark Bugzilla, or even better the actual change on Gerrit where the context is obvious is the best place for such observations.

This does look like an error.

grahamb's avatar
23.8k
grahamb
answered 2020-01-10 12:21:12 +0000
edit flag offensive 0 remove flag delete link

Comments

OK,thank you, i'll try

eaglegai's avatar eaglegai (2020-01-13 01:20:27 +0000) edit

fix link :https://code.wireshark.org/review/#/c/35837/

eaglegai's avatar eaglegai (2020-01-17 01:38:54 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer