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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? libewf_segment_table.c

?? sleuthit-2.09 一個磁盤的工具集
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * libewf segment table * * 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_notify.h"#include "libewf_segment_table.h"#include "libewf_string.h"/* Allocates memory for a segment table struct * Returns a pointer to the new instance, NULL on error */LIBEWF_SEGMENT_TABLE *libewf_segment_table_alloc( uint16_t amount ){	LIBEWF_SEGMENT_TABLE *segment_table = NULL;	uint16_t iterator                   = 0;	segment_table = (LIBEWF_SEGMENT_TABLE *) libewf_common_alloc( LIBEWF_SEGMENT_TABLE_SIZE );	if( segment_table == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate segment table.\n" );		return( NULL );	}#if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_CHARACTER_SUPPORT_FUNCTIONS )	segment_table->filename = (wchar_t **) libewf_common_alloc_cleared( ( amount * LIBEWF_SEGMENT_TABLE_FILENAME_SIZE ), 0 );#else	segment_table->filename = (char **) libewf_common_alloc_cleared( ( amount * LIBEWF_SEGMENT_TABLE_FILENAME_SIZE ), 0 );#endif	if( segment_table->filename == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate filename array.\n" );		libewf_common_free( segment_table );		return( NULL );	}	segment_table->file_descriptor = (int *) libewf_common_alloc_cleared( ( amount * LIBEWF_SEGMENT_TABLE_FILE_DESCRIPTOR_SIZE ), -1 );	if( segment_table->file_descriptor == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate file descriptor array.\n" );		libewf_common_free( segment_table->filename );		libewf_common_free( segment_table );		return( NULL );	}	segment_table->file_offset = (off_t *) libewf_common_alloc_cleared( ( amount * LIBEWF_SEGMENT_TABLE_FILE_OFFSET_SIZE ), 0 );	if( segment_table->file_offset == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate file offset array.\n" );		libewf_common_free( segment_table->filename );		libewf_common_free( segment_table->file_descriptor );		libewf_common_free( segment_table );		return( NULL );	}	segment_table->amount_of_chunks = (uint32_t *) libewf_common_alloc_cleared( ( amount * LIBEWF_SEGMENT_TABLE_AMOUNT_OF_CHUNKS_SIZE ), 0 );	if( segment_table->amount_of_chunks == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate amount of chunks array.\n" );		libewf_common_free( segment_table->filename );		libewf_common_free( segment_table->file_descriptor );		libewf_common_free( segment_table->file_offset );		libewf_common_free( segment_table );		return( NULL );	}	segment_table->section_list = (LIBEWF_SECTION_LIST **) libewf_common_alloc_cleared( ( amount * LIBEWF_SEGMENT_TABLE_SECTION_LIST_SIZE ), 0 );	if( segment_table->section_list == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate section list array.\n" );		libewf_common_free( segment_table->filename );		libewf_common_free( segment_table->file_descriptor );		libewf_common_free( segment_table->file_offset );		libewf_common_free( segment_table->amount_of_chunks );		libewf_common_free( segment_table );		return( NULL );	}	for( iterator = 0; iterator < amount; iterator++ )	{		if( segment_table->section_list[ iterator ] == NULL )		{			segment_table->section_list[ iterator ] = (LIBEWF_SECTION_LIST *) libewf_common_alloc( LIBEWF_SECTION_LIST_SIZE );			if( segment_table->section_list[ iterator ] == NULL )			{				LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: unable to allocate section list.\n" );				/* The current entry does not need to be freed, because it was never allocated				 * but the first entry 0 does, because the iterator is a unsigned integer				 * the iterator - 1 construction is used				 * There are no entries in the list				 */				for( ; iterator > 0; iterator-- )				{					libewf_common_free( segment_table->section_list[ iterator - 1 ] );				}				libewf_common_free( segment_table->filename );				libewf_common_free( segment_table->file_descriptor );				libewf_common_free( segment_table->file_offset );				libewf_common_free( segment_table->amount_of_chunks );				libewf_common_free( segment_table->section_list );				libewf_common_free( segment_table );				return( NULL );			}			segment_table->section_list[ iterator ]->first = NULL;			segment_table->section_list[ iterator ]->last  = NULL;		}		else		{			LIBEWF_WARNING_PRINT( "libewf_segment_table_alloc: section list already created.\n" );		}	}	segment_table->amount = amount;	return( segment_table );}/* Reallocates memory for the segment table  * Returns a pointer to the instance, NULL on error */LIBEWF_SEGMENT_TABLE *libewf_segment_table_realloc( LIBEWF_SEGMENT_TABLE *segment_table, uint16_t amount ){	void *reallocation = NULL;	uint16_t iterator  = 0;	if( segment_table == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: invalid segment table.\n" );		return( NULL );	}	reallocation = libewf_common_realloc_new_cleared( segment_table->filename, ( segment_table->amount * LIBEWF_SEGMENT_TABLE_FILENAME_SIZE ), ( amount * LIBEWF_SEGMENT_TABLE_FILENAME_SIZE ), 0 );	if( reallocation == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: unable to reallocate dynamic filename array.\n" );		return( NULL );	}#if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_CHARACTER_SUPPORT_FUNCTIONS )	segment_table->filename = (wchar_t **) reallocation;#else	segment_table->filename = (char **) reallocation;#endif	reallocation            = libewf_common_realloc_new_cleared( segment_table->file_descriptor, ( segment_table->amount * LIBEWF_SEGMENT_TABLE_FILE_DESCRIPTOR_SIZE ), ( amount * LIBEWF_SEGMENT_TABLE_FILE_DESCRIPTOR_SIZE ), -1 );	if( reallocation == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: unable to reallocate dynamic file descriptor array.\n" );		return( NULL );	}	segment_table->file_descriptor = (int *) reallocation;	reallocation                   = libewf_common_realloc_new_cleared( segment_table->file_offset, ( segment_table->amount * LIBEWF_SEGMENT_TABLE_FILE_OFFSET_SIZE ), ( amount * LIBEWF_SEGMENT_TABLE_FILE_OFFSET_SIZE ), 0 );	if( reallocation == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: unable to reallocate dynamic file offset array.\n" );		return( NULL );	}	segment_table->file_offset = (off_t *) reallocation;	reallocation               = libewf_common_realloc_new_cleared( segment_table->amount_of_chunks, ( segment_table->amount * LIBEWF_SEGMENT_TABLE_AMOUNT_OF_CHUNKS_SIZE ), ( amount * LIBEWF_SEGMENT_TABLE_AMOUNT_OF_CHUNKS_SIZE ), 0 );	if( reallocation == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: unable to reallocate dynamic amount of chunks array.\n" );		return( NULL );	}	segment_table->amount_of_chunks = (uint32_t *) reallocation;	reallocation                    = libewf_common_realloc_new_cleared( segment_table->section_list, ( segment_table->amount * LIBEWF_SEGMENT_TABLE_SECTION_LIST_SIZE ), ( amount * LIBEWF_SEGMENT_TABLE_SECTION_LIST_SIZE ), 0 );	if( reallocation == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: unable to reallocate dynamic section list array.\n" );		return( NULL );	}	segment_table->section_list = (LIBEWF_SECTION_LIST **) reallocation;	for( iterator = segment_table->amount; iterator < amount; iterator++ )	{		if( segment_table->section_list[ iterator ] == NULL )		{			segment_table->section_list[ iterator ] = (LIBEWF_SECTION_LIST *) libewf_common_alloc( LIBEWF_SECTION_LIST_SIZE );			if( segment_table->section_list[ iterator ] == NULL )			{				LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: unable to allocate section list.\n" );				return( NULL );			}			segment_table->section_list[ iterator ]->first = NULL;			segment_table->section_list[ iterator ]->last  = NULL;		}		else		{			LIBEWF_WARNING_PRINT( "libewf_segment_table_realloc: section list already created.\n" );		}	}	segment_table->amount = amount;	return( segment_table );}/* Frees memory of a file list struct including elements */void libewf_segment_table_free( LIBEWF_SEGMENT_TABLE *segment_table ){	LIBEWF_SECTION_LIST_ENTRY *section_list_entry         = NULL;	LIBEWF_SECTION_LIST_ENTRY *current_section_list_entry = NULL;	uint16_t iterator                                     = 0;	if( segment_table == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_segment_table_free: invalid segment table.\n" );		return;	}	for( iterator = 0; iterator < segment_table->amount; iterator++ )	{		if( segment_table->filename[ iterator ] != NULL )		{			libewf_common_free( segment_table->filename[ iterator ] );

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米影视一区二区三区| 亚洲人成影院在线观看| 久久电影国产免费久久电影| 91精品国产欧美一区二区| 午夜精品福利一区二区三区蜜桃| 欧美日韩电影在线播放| 日本不卡一区二区三区| 日韩一区二区电影在线| 欧美日韩在线电影| 日韩在线播放一区二区| 精品av久久707| 成人黄色国产精品网站大全在线免费观看| 国产精品久久久久9999吃药| 91视视频在线观看入口直接观看www| 亚洲品质自拍视频| 欧美色图在线观看| 精品一区二区三区免费观看| 中文字幕av资源一区| 一本色道久久综合亚洲91| 三级在线观看一区二区| 久久久国产一区二区三区四区小说 | 国产精品美日韩| 91官网在线免费观看| 日韩中文字幕亚洲一区二区va在线| 日韩久久免费av| jlzzjlzz亚洲日本少妇| 亚洲成人免费av| 久久影院午夜论| 91久久精品一区二区三| 美女视频一区二区三区| 国产精品女同一区二区三区| 欧洲精品一区二区| 国产一区二区三区久久悠悠色av| 亚洲人成人一区二区在线观看| 欧美另类z0zxhd电影| 国产.欧美.日韩| 午夜精品久久久久久久久| 久久久久久久国产精品影院| 一本大道久久a久久精二百| 久久se这里有精品| 一区二区三区在线播| 精品国产一区二区精华| 在线观看中文字幕不卡| 国产成人在线免费| 日本不卡在线视频| 一区二区三区高清在线| 久久久不卡影院| 欧美久久一区二区| 91麻豆视频网站| 国产精品一区在线观看你懂的| 亚洲香蕉伊在人在线观| 日本不卡一区二区三区高清视频| 国产亚洲欧美日韩在线一区| 日本韩国精品一区二区在线观看| 国产乱对白刺激视频不卡| 亚洲.国产.中文慕字在线| 中文字幕制服丝袜一区二区三区 | 亚洲成人激情社区| 国产精品国产三级国产aⅴ原创| 日韩一区二区在线免费观看| 在线亚洲人成电影网站色www| 福利一区二区在线| 久久99久久精品欧美| 三级一区在线视频先锋 | 亚洲综合激情网| 国产精品国产精品国产专区不蜜 | 精品一区二区久久久| 日韩和欧美一区二区三区| 亚洲精品国产精华液| 国产精品亲子乱子伦xxxx裸| 精品国精品自拍自在线| 欧美α欧美αv大片| 欧美一区二区不卡视频| 欧美日韩国产一级二级| 欧美唯美清纯偷拍| 欧美日韩美女一区二区| 欧美视频一区二区三区四区 | 国产电影精品久久禁18| 国产一区美女在线| 国产一区二区按摩在线观看| 精品一区二区三区影院在线午夜| 日本午夜一区二区| 久久国产福利国产秒拍| 久久99精品一区二区三区三区| 美女视频一区二区| 狠狠色丁香久久婷婷综合丁香| 久久精品国产一区二区| 激情偷乱视频一区二区三区| 激情综合五月天| 欧美军同video69gay| 欧美日韩黄色影视| 在线综合亚洲欧美在线视频| 91精品国产入口| 欧美电影免费提供在线观看| 欧美成人vps| 国产校园另类小说区| 国产精品久久一级| 亚洲最大成人网4388xx| 天堂一区二区在线免费观看| 免费看日韩a级影片| 国产精品综合二区| 99精品国产99久久久久久白柏| 91丨porny丨在线| 欧美精品久久一区二区三区| 26uuu亚洲综合色| 国产精品乱码一区二区三区软件| 亚洲男人天堂一区| 麻豆视频观看网址久久| 丁香天五香天堂综合| 日本乱码高清不卡字幕| 欧美一区二区在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 伊人色综合久久天天人手人婷| 亚洲成人自拍偷拍| 国产精品自在欧美一区| 欧美性受xxxx| 久久一二三国产| 一区二区三区中文字幕| 久久不见久久见免费视频1| 色综合久久88色综合天天 | 久久网站最新地址| 一区二区三区久久| 国产乱码精品一区二区三区忘忧草| 日韩欧美久久久| 1024亚洲合集| 麻豆一区二区三| 91成人免费网站| 国产日产欧美一区二区视频| 亚洲国产日韩综合久久精品| 国产jizzjizz一区二区| 欧美一区二区三区日韩| 亚洲欧美日本在线| 国产中文字幕精品| 制服丝袜激情欧洲亚洲| ...av二区三区久久精品| 久久福利视频一区二区| 欧美探花视频资源| 国产精品三级视频| 久久99国产精品久久99 | 国产jizzjizz一区二区| 欧美欧美欧美欧美| 综合电影一区二区三区| 国产美女精品人人做人人爽| 337p亚洲精品色噜噜狠狠| 亚洲欧美日韩国产手机在线| 国产伦精品一区二区三区免费迷| 666欧美在线视频| 一区二区三区四区中文字幕| 不卡免费追剧大全电视剧网站| 亚洲精品一线二线三线无人区| 三级一区在线视频先锋| 在线视频一区二区三区| 亚洲视频免费观看| 成人网在线免费视频| 久久影院午夜片一区| 久久精品久久精品| 91精品国产91久久久久久最新毛片| 一区二区三区日本| 一本到不卡免费一区二区| 亚洲女爱视频在线| 色呦呦一区二区三区| 亚洲日本电影在线| 91啪亚洲精品| 亚洲精选在线视频| 色八戒一区二区三区| 亚洲精品乱码久久久久久 | 国产伦精品一区二区三区免费| 日韩三级在线观看| 毛片一区二区三区| 日韩三级中文字幕| 精久久久久久久久久久| 精品少妇一区二区三区在线播放| 美女视频黄 久久| 欧美成人猛片aaaaaaa| 国内精品国产成人国产三级粉色 | 91色乱码一区二区三区| 亚洲欧美中日韩| 色偷偷久久人人79超碰人人澡| 亚洲黄色av一区| 亚洲欧洲成人精品av97| 91免费精品国自产拍在线不卡 | 一区二区三区在线影院| 在线观看免费一区| 爽好多水快深点欧美视频| 日韩欧美中文字幕制服| 国内精品久久久久影院薰衣草| 国产欧美一区在线| 99re视频这里只有精品| 亚洲国产精品自拍| 日韩一区二区三区视频| 国产老妇另类xxxxx| 亚洲视频一区在线观看| 欧美男女性生活在线直播观看| 日韩av高清在线观看| 久久网站热最新地址| 色综合久久中文综合久久97| 午夜欧美视频在线观看| 久久夜色精品一区| 色噜噜偷拍精品综合在线| 日韩和欧美一区二区三区|