/* This returns an error on a short read, even if the short read hit the EOF immediately. (The assumption is that each packet has a header followed by raw packet data, and that we've already read the header, so if we get an EOF trying to read the packet data, the file has been cut short, even if the read didn't read any data at all.)  */
gboolean wtap_read_packet_bytes(FILE_T fh, Buffer *buf, guint length, int *err, gchar **err_info)
/* This returns an error on a short read, even if the short read hit the EOF immediately. (The assumption is that each packet has a header followed by raw packet data, and that we've already read the header, so if we get an EOF trying to read the packet data, the file has been cut short, even if the read didn't read any data at all.)  */
gboolean wtap_read_packet_bytes(FILE_T fh, Buffer *buf, guint length, int *err, gchar **err_info)
{
	ws_buffer_assure_space(buf, length);
	return wtap_read_bytes(fh, ws_buffer_start_ptr(buf), length, err,
	    err_info);
}