diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-06-14 21:01:57 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-06-15 04:03:07 +0000 |
commit | 1e84591f4f07dc712bee9be3a33508a5510bb357 (patch) | |
tree | a3c15ba519ca165e3aea7390b34b43bda1c28bd5 /wiretap | |
parent | 7f3d7199fba4bb6cdfc7d0873444c861ffe7064f (diff) |
Fix some "bad file" messages.
The number being compared against is the amount of data *remaining* in
the comment information, not the *size* of the comment information.
And it's unsigned, so format it with %u.
Change-Id: I5f02302ad4acbc3b27655ff5518e6e56d464020d
Reviewed-on: https://code.wireshark.org/review/28280
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/netmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/netmon.c b/wiretap/netmon.c index 5ff1582e0b..34ea6efdcf 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -702,7 +702,7 @@ wtap_open_return_val netmon_open(wtap *wth, int *err, gchar **err_info) } if (pletoh32(&comment_header.titleLength) > comment_table_size) { *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("netmon: comment title size is %u, which is larger than the entire comment section (%d)", + *err_info = g_strdup_printf("netmon: comment title size is %u, which is larger than the amount remaining in the comment section (%u)", pletoh32(&comment_header.titleLength), comment_table_size); g_hash_table_destroy(comment_table); return WTAP_OPEN_ERROR; @@ -755,7 +755,7 @@ wtap_open_return_val netmon_open(wtap *wth, int *err, gchar **err_info) /* Make sure comment size is sane */ if (comment_rec->descLength > comment_table_size) { *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("netmon: comment description size is %u, which is larger than the entire comment section (%d)", + *err_info = g_strdup_printf("netmon: comment description size is %u, which is larger than the amount remaining in the comment section (%u)", comment_rec->descLength, comment_table_size); g_hash_table_destroy(comment_table); return WTAP_OPEN_ERROR; |