亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? libewf_section.c

?? sleuthit-2.09 一個磁盤的工具集
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * libewf file reading * * Copyright (c) 2006-2007, Joachim Metz <forensics@hoffmannbv.nl>, * Hoffmann Investigations. All rights reserved. * * Refer to AUTHORS for acknowledgements. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, *   this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, *   this list of conditions and the following disclaimer in the documentation *   and/or other materials provided with the distribution. * - Neither the name of the creator, related organisations, nor the names of *   its contributors may be used to endorse or promote products derived from *   this software without specific prior written permission. * - All advertising materials mentioning features or use of this software *   must acknowledge the contribution by people stated in the acknowledgements. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, COMPANY AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */#include "libewf_includes.h"#include <libewf/libewf_definitions.h>#include "libewf_common.h"#include "libewf_debug.h"#include "libewf_endian.h"#include "libewf_header_values.h"#include "libewf_notify.h"#include "libewf_segment_table.h"#include "ewf_chunk.h"#include "ewf_compress.h"#include "ewf_crc.h"#include "ewf_data.h"#include "ewf_definitions.h"#include "ewf_error2.h"#include "ewf_file_header.h"#include "ewf_hash.h"#include "ewf_header.h"#include "ewf_header2.h"#include "ewf_ltree.h"#include "ewf_section.h"#include "ewf_volume.h"#include "ewf_volume_smart.h"#include "ewf_table.h"/* Reads and processes a section start * Returns the section start, or NULL on error */EWF_SECTION *libewf_section_start_read( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor ){	EWF_SECTION *section   = NULL;	EWF_CRC calculated_crc = 0;	EWF_CRC stored_crc     = 0;	if( internal_handle == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_read: invalid handle.\n" );		return( NULL );	}	section = (EWF_SECTION *) libewf_common_alloc( EWF_SECTION_SIZE );	if( section == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_read: unable to allocate section start.\n" );		return( NULL );	}	if( ewf_section_read( section, file_descriptor ) <= -1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_read: unable to read section start.\n" );		libewf_common_free( section );		return( NULL );	}	LIBEWF_VERBOSE_EXEC( libewf_debug_section_fprint( stderr, section ); );#ifdef HAVE_DEBUG_OUTPUT	LIBEWF_VERBOSE_EXEC( libewf_dump_data( section->padding, 40 ); );#endif	if( ewf_crc_calculate( &calculated_crc, (uint8_t *) section, ( EWF_SECTION_SIZE - EWF_CRC_SIZE ), 1 ) != 1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_read: unable to calculate CRC.\n" );		libewf_common_free( section );		return( NULL );	}	if( libewf_endian_convert_32bit( &stored_crc, section->crc ) != 1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_read: unable to convert stored CRC value.\n" );		libewf_common_free( section );		return( NULL );	}	if( stored_crc != calculated_crc )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_read: CRC does not match (in file: %" PRIu32 ", calculated: %" PRIu32 ").\n", stored_crc, calculated_crc );		if( internal_handle->error_tollerance < LIBEWF_ERROR_TOLLERANCE_COMPENSATE )		{			libewf_common_free( section );			return( NULL );		}	}	return( section );}/* Write a section start to file * Returns the amount of bytes written, or -1 on error */ssize_t libewf_section_start_write( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, EWF_CHAR *section_type, size_t section_data_size, off_t start_offset ){	EWF_SECTION *section     = NULL;	ssize_t write_count      = 0;	size_t section_type_size = 0;	uint64_t section_size    = 0;	uint64_t section_offset  = 0;	if( internal_handle == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: invalid handle.\n" );		return( -1 );	}	section_type_size = ewf_string_length( section_type );	if( section_type_size == 0 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: section type is empty.\n" );		return( -1 );	}	if( section_type_size >= 16 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: section type is too long.\n" );		return( -1 );	}	section = (EWF_SECTION *) libewf_common_alloc( EWF_SECTION_SIZE );	if( section == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: unable to create section.\n" );		return( -1 );	}	if( libewf_common_memset( section, 0, EWF_SECTION_SIZE ) == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: unable to clear section.\n" );		libewf_common_free( section );		return( -1 );	}	/* Add one character for the end of string	 */	if( ewf_string_copy( section->type, section_type, ( section_type_size + 1 ) ) == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: unable to set section type.\n" );		libewf_common_free( section );		return( -1 );	}	section_size   = EWF_SECTION_SIZE + section_data_size;	section_offset = start_offset + section_size;	if( libewf_endian_revert_64bit( section_size, section->size ) != 1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: unable to revert size value.\n" );		libewf_common_free( section );		return( -1 );	}	if( libewf_endian_revert_64bit( section_offset, section->next ) != 1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: unable to revert next offset value.\n" );		libewf_common_free( section );		return( -1 );	}	write_count = ewf_section_write( section, file_descriptor );	libewf_common_free( section );	if( write_count == -1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_start_write: unable to write section to file.\n" );		return( -1 );	}	return( write_count );}/* Write a compressed string section to file * Returns the amount of bytes written, or -1 on error */ssize_t libewf_section_compressed_string_write( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, off_t start_offset, EWF_CHAR *section_type, EWF_CHAR *uncompressed_string, size_t size, int8_t compression_level ){	EWF_CHAR *compressed_string = NULL;	ssize_t section_write_count = 0;	ssize_t string_write_count  = 0;	if( internal_handle == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_compressed_string_write: invalid handle.\n" );		return( -1 );	}	if( section_type == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_compressed_string_write: invalid section type.\n" );		return( -1 );	}	if( uncompressed_string == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_compressed_string_write: invalid uncompressed string.\n" );		return( -1 );	}	LIBEWF_VERBOSE_PRINT( "libewf_section_compressed_string_write: String:\n" );	LIBEWF_VERBOSE_EXEC( libewf_debug_header_fprint( stderr, uncompressed_string, size ); );	compressed_string = ewf_string_compress( uncompressed_string, &size, compression_level );	if( compressed_string == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_compressed_string_write: unable to compress string.\n" );		return( -1 );	}	section_write_count = libewf_section_start_write( internal_handle, file_descriptor, section_type, size, start_offset );	if( section_write_count == -1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_compressed_string_write: unable to write section to file.\n" );		libewf_common_free( compressed_string );		return( -1 );	}	string_write_count = ewf_string_write_from_buffer( compressed_string, file_descriptor, size );	libewf_common_free( compressed_string );	if( string_write_count == -1 )	{		LIBEWF_WARNING_PRINT( "libewf_section_compressed_string_write: unable to write string to file.\n" );		return( -1 );	}	return( section_write_count + string_write_count );}/* Reads a header section * Returns the amount of bytes read, or -1 on error */ssize_t libewf_section_header_read( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, size_t size ){	EWF_HEADER *header = NULL;	ssize_t read_count = (ssize_t) size;	if( internal_handle == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_header_read: invalid handle.\n" );		return( -1 );	}	header = ewf_header_read( file_descriptor, &size );	if( header == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_header_read: unable to read header.\n" );		return( -1 );	}	LIBEWF_VERBOSE_PRINT( "libewf_section_header_read: Header:\n" );	LIBEWF_VERBOSE_EXEC( libewf_debug_header_fprint( stderr, header, size ); );	if( libewf_internal_handle_is_set_header( internal_handle ) == 0 )	{		if( libewf_internal_handle_set_header( internal_handle, header, size ) != 1 )		{			LIBEWF_WARNING_PRINT( "libewf_section_header_read: unable to set header in handle.\n" );			libewf_common_free( header );			if( internal_handle->error_tollerance < LIBEWF_ERROR_TOLLERANCE_COMPENSATE )			{				return( -1 );			}		}	}	else	{		libewf_common_free( header );	}	internal_handle->amount_of_header_sections++;	return( read_count );}/* Write a header section to file * Returns the amount of bytes written, or -1 on error */ssize_t libewf_section_header_write( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, off_t start_offset, EWF_HEADER *header, size_t size, int8_t compression_level ){	ssize_t section_write_count = 0;	section_write_count = libewf_section_compressed_string_write( internal_handle, file_descriptor, start_offset, (EWF_CHAR *) "header", header, size, compression_level );	if( section_write_count != -1 )	{		internal_handle->amount_of_header_sections++;	}	return( section_write_count );}/* Reads a header2 section * Returns the amount of bytes read, or -1 on error */ssize_t libewf_section_header2_read( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, size_t size ){	EWF_HEADER *header2 = NULL;	ssize_t read_count  = (ssize_t) size;	if( internal_handle == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_header2_read: invalid handle.\n" );		return( -1 );	}	header2 = ewf_header2_read( file_descriptor, &size );	if( header2 == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_header2_read: unable to read header2.\n" );		return( -1 );	}	LIBEWF_VERBOSE_PRINT( "libewf_section_header2_read: Header2:\n" );	LIBEWF_VERBOSE_EXEC( libewf_debug_header2_fprint( stderr, header2, size ); );	if( libewf_internal_handle_is_set_header2( internal_handle ) == 0 )	{		if( libewf_internal_handle_set_header2( internal_handle, header2, size ) != 1 )		{			LIBEWF_WARNING_PRINT( "libewf_section_header2_read: unable to set header2 in handle.\n" );			libewf_common_free( header2 );			if( internal_handle->error_tollerance < LIBEWF_ERROR_TOLLERANCE_COMPENSATE )			{				return( -1 );			}		}	}	else	{		libewf_common_free( header2 );	}	internal_handle->amount_of_header_sections++;	return( read_count );}/* Write a header2 section to file * Returns the amount of bytes written, or -1 on error */ssize_t libewf_section_header2_write( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, off_t start_offset, EWF_HEADER2 *header2, size_t size, int8_t compression_level ){	ssize_t section_write_count = 0;	section_write_count = libewf_section_compressed_string_write( internal_handle, file_descriptor, start_offset, (EWF_CHAR *) "header2", header2, size, compression_level );	if( section_write_count != -1 )	{		internal_handle->amount_of_header_sections++;	}	return( section_write_count );}/* Reads an EWF-S01 (SMART) volume section * Returns the amount of bytes read, or -1 on error */ssize_t libewf_section_volume_s01_read( LIBEWF_INTERNAL_HANDLE *internal_handle, int file_descriptor, size_t size ){	EWF_VOLUME_SMART *volume_smart = NULL;	EWF_CRC calculated_crc         = 0;	EWF_CRC stored_crc             = 0;	int32_t bytes_per_chunk        = 0;	if( internal_handle == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_section_volume_s01_read: invalid handle.\n" );		return( -1 );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区久久| 国产999精品久久久久久绿帽| 亚洲成av人影院在线观看网| 日韩av一级片| 免费观看30秒视频久久| 91丨九色丨蝌蚪丨老版| 亚洲精品在线观看网站| 亚洲成人精品在线观看| 91在线一区二区| 久久亚洲综合色一区二区三区 | 国产91精品一区二区麻豆网站| 91豆麻精品91久久久久久| 国产亚洲女人久久久久毛片| 亚洲超碰97人人做人人爱| 成人视屏免费看| 国产丝袜在线精品| 久久99精品久久久久婷婷| 欧美另类一区二区三区| 一区二区三区中文免费| 成人深夜在线观看| 亚洲国产精品黑人久久久| 免费国产亚洲视频| 欧美高清dvd| 午夜激情一区二区三区| 欧美性猛片xxxx免费看久爱| 最近中文字幕一区二区三区| 国产成人av电影| 久久久久国产一区二区三区四区 | 日韩一区欧美一区| 成人一区二区三区在线观看| 久久久国产午夜精品 | 欧美成人午夜电影| 日本欧美加勒比视频| 制服.丝袜.亚洲.另类.中文 | 亚洲欧洲三级电影| 北条麻妃一区二区三区| 国产欧美日韩另类一区| 成人国产精品视频| 中文字幕中文字幕在线一区| 99久久99久久精品国产片果冻| 日本一区二区不卡视频| 99re这里都是精品| 一区二区三国产精华液| 欧美日韩www| 免费高清不卡av| 久久久久久亚洲综合| 成人午夜伦理影院| 亚洲另类在线制服丝袜| 欧美日韩国产一二三| 日本成人中文字幕| 久久欧美中文字幕| 91色在线porny| 无吗不卡中文字幕| 久久只精品国产| 99免费精品视频| 亚洲国产精品精华液网站| 91精品国产一区二区三区| 国内偷窥港台综合视频在线播放| 国产色爱av资源综合区| 色天天综合久久久久综合片| 首页国产丝袜综合| 国产婷婷色一区二区三区| 91影院在线观看| 麻豆91在线看| 亚洲欧美综合网| 91精品国产高清一区二区三区蜜臀| 精品一区二区三区蜜桃| 最新久久zyz资源站| 7777精品久久久大香线蕉| 国产成人精品免费看| 亚洲最快最全在线视频| 精品99一区二区三区| 色老综合老女人久久久| 久久草av在线| 亚洲自拍欧美精品| 精品久久久久久最新网址| 91免费在线看| 激情图区综合网| 亚洲宅男天堂在线观看无病毒| 欧美xingq一区二区| 在线亚洲一区观看| 国产91综合网| 捆绑调教美女网站视频一区| 亚洲码国产岛国毛片在线| 精品国产欧美一区二区| 欧美午夜理伦三级在线观看| 国产91丝袜在线18| 另类小说视频一区二区| 亚洲一区在线观看免费观看电影高清| 精品国产一区二区三区不卡| 欧美乱妇23p| 91福利在线观看| www.色精品| 国产高清亚洲一区| 日本sm残虐另类| 亚洲无人区一区| 亚洲柠檬福利资源导航| 亚洲国产精品激情在线观看| 精品国产一区二区国模嫣然| 制服丝袜亚洲网站| 欧美三级蜜桃2在线观看| 91在线看国产| 99久久婷婷国产精品综合| 国产一区二区不卡| 国产最新精品精品你懂的| 日本欧美一区二区三区| 日本最新不卡在线| 午夜不卡av免费| 午夜精品久久久久久久| 亚洲午夜视频在线| 亚洲一区二区三区四区在线免费观看 | 欧美一区二区高清| 欧美精品亚洲一区二区在线播放| 在线影视一区二区三区| 91丝袜美腿高跟国产极品老师| 国产99久久久国产精品潘金网站| 国产盗摄精品一区二区三区在线| 精东粉嫩av免费一区二区三区| 美女免费视频一区| 久久99热这里只有精品| 国产一区二区毛片| 国产精品资源在线观看| 国产一区二区三区久久久| 国产传媒日韩欧美成人| 成人午夜在线视频| 一本到三区不卡视频| 欧洲在线/亚洲| 欧美欧美欧美欧美| 精品少妇一区二区三区免费观看| 91精品麻豆日日躁夜夜躁| 日韩免费视频线观看| www久久精品| 一色桃子久久精品亚洲| 一区2区3区在线看| 日本sm残虐另类| 国产成人av一区| 一本色道**综合亚洲精品蜜桃冫| 欧美视频一区在线| 精品国产乱码久久久久久夜甘婷婷 | 免费的成人av| 国产精品亚洲人在线观看| 91小视频在线观看| 91精品国产综合久久蜜臀| 久久久91精品国产一区二区三区| 午夜激情久久久| 美女视频网站黄色亚洲| 成人网在线播放| 91精品欧美久久久久久动漫| 国产日韩欧美不卡在线| 亚洲人快播电影网| 美女爽到高潮91| 成人18视频日本| 欧美一级生活片| 日韩毛片视频在线看| 日本欧美一区二区在线观看| 北岛玲一区二区三区四区| 欧日韩精品视频| 欧美国产精品一区二区| 日韩主播视频在线| 波多野洁衣一区| 日韩免费视频一区| 亚洲一区二区在线视频| 国产成人av自拍| 日韩欧美另类在线| 亚洲一区二区三区免费视频| 国产大陆亚洲精品国产| 91精品在线一区二区| 亚洲激情六月丁香| 国产mv日韩mv欧美| 日韩一区二区三区观看| 亚洲精品国产第一综合99久久 | 成人精品鲁一区一区二区| 91精品国产高清一区二区三区蜜臀| 国产欧美精品一区aⅴ影院| 喷水一区二区三区| 欧美亚洲国产一区在线观看网站| 国产精品天美传媒| 精品一区二区在线播放| 制服丝袜亚洲网站| 亚洲精品国产视频| 91在线观看免费视频| 国产女人18水真多18精品一级做| 免费在线看一区| 欧美久久久影院| 一区二区三区高清不卡| 91麻豆精品在线观看| 国产精品美女久久久久久久久久久| 狠狠色狠狠色综合| 精品99一区二区| 激情综合网天天干| 日韩精品专区在线影院重磅| 婷婷丁香激情综合| 欧美喷潮久久久xxxxx| 午夜不卡av免费| 884aa四虎影成人精品一区| 亚洲成人精品一区二区| 欧美伦理视频网站| 日韩精品乱码免费| 日韩精品专区在线影院重磅| 久久电影国产免费久久电影|