forked from osmocom/wireshark
Sorry, the bytes-to-read argument to file_read() is unsigned int, so
cast packet_size to unsigned int. Yes, that means that it can't read more than 65535 bytes. Clean up white space while we're at it. svn path=/trunk/; revision=54652
This commit is contained in:
parent
035526af10
commit
c79fb5464b
|
@ -1679,7 +1679,7 @@ local_wtap_read(capture_file *cf, struct wtap_pkthdr* file_phdr, int *err, gchar
|
|||
gint64 packet_size = wtap_file_size(cf->wth, err);
|
||||
|
||||
*data_buffer = (guint8*)g_malloc((gsize)packet_size);
|
||||
bytes_read = file_read(*data_buffer, (gsize)packet_size, cf->wth->fh);
|
||||
bytes_read = file_read(*data_buffer, (unsigned int)packet_size, cf->wth->fh);
|
||||
|
||||
if (bytes_read < 0) {
|
||||
*err = file_error(cf->wth->fh, err_info);
|
||||
|
|
Loading…
Reference in New Issue