• Blog
  • Local Log
  • Tag Cloud
  • Key Log
  • Guestbook
  • RSS Feed
  • Write a Post
  • Admin

혹시 블로그 스킨이 깨져 보이시나요? 최신버전의 Internet Explorer(Windows용), Opera, Firefox를 사용해보세요.

우리 주변의 항암 식품들

정보/스크랩
2009/03/17 16:20
 

색색의 피망들

기름에 살짝 볶아 다른 야채와 섞어 샐러드로 즐기는 색색의 피망들을 하루 1개를 먹으면

항암 효과가 있는 카로틴과 비타민 E를 효과적으로 흡수할 수 있습니다.

특히 빨간 피망이 좋은데, 카로틴 함량이 청피망의 2. 8배, 노랑 피망의 5. 5배가 더 많다고 합니다~


맛있는 단호박
단호박에는 암 유전자의 출현과 암세포의 증식을 억제시키는 작용을 한다고 합니다!

호박 안의 색이 누런색일수록 암 억제 효과가 크며, 기름으로 조리해 먹으면 카로틴을 제대로 흡수할 수 있다고 합니다. 호박씨에도 비타민이 풍부하므로 버리지 말고, 말려서 먹는것이 좋다고 합니다~


까만 검은깨
검은깨는 살짝 볶은 뒤 가루로 빻아 매일 1~2큰술씩 먹는것이 좋다고 합니다.

검은깨는 암과 동맥경화를 유발하는 활성 산소를 제거해주는 역활은 한다고 합니다.


맛있는 바나나
바나나는 몸의 면역성을 높여 주는 백혈구를 활성화시켜 암 예방에 효과적인 열대 과일입니다.

껍질에 검은 반점이 생긴 바나나가 맛과 영양분이 가장 좋은 상태라는것!


참치 & 꽁치
싱싱한 회로 먹는 것이 가장 좋지만, 굽거나 조려 먹는 것도 충분히 좋습니다.

튀기는 방법은 가장 안좋은 방법이구요.

참치와 꽁치에 풍부한 DHA는 발암에 관련되는 효소의 합성을 막아주어

대장암, 유방암, 자궁경부암을 억제하는 효과가 있다고 합니다.


감자
깨끗이 씻어 껍질까지 갈아 즙으로 마시는 것이 가장 좋겠지만, 쪄서 먹는 것도 좋은 방법입니다.

쪄서 먹을때도 이때 껍질째 먹는 것이 좋은데, 껍질에 암세포 증식을 억제하는 효과가 있다고 합니다.


팽이버섯
된장국, 전골에 넣으면, 발암 위험을 없애고, 암을 막는 방어 기능을 강화하는 효과를 볼 수 있다고 합니다.


사과
사과에 있는 펙틴성분은 발암 물질과 활성 산소를 제거하고 배설을 촉진시켜 대장암 예방에 특효약으로 알려져 있습니다.

푸른 사과보다는 붉은 사과가 좋으며 하루 한 개씩 먹으면 되는데, 사과를 그냥 먹기 보다는 가열하면 활성 산소 제거 능력이 더욱 커지므로 다양한 방법으로 조리해 먹는것이 좋습니다.


시금치
피부암, 대장암 억제 효과가 있는 루테인이 풍부한 시금치는,

기름에 무쳐 먹으면 효과적으로 섭취할 수 있습니다.

시금치를 데칠 때에는 단시간에 빨리 데쳐 영양소 파괴를 최소화하는 것이 가장 중요합니다.


마늘

마늘은 이미 모두가 알고 있는 몸에 좋은 항암식품이기도 합니다.

마늘의 단점은 어린아이들이 먹기에는 너무 맵다 인데.

먹기전에 전자렌지에 살짝 돌리게 되면 매운맛만 사라지게 되어 먹기 아주 좋습니다.


내용출처 : 우리주변에서 쉽게 만나는 항암기능을 가진 식품들

크리에이티브 커먼즈 라이센스
Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
No received trackback. / No comment.

Trackback Address :: http://sinwoong.co.kr/trackback/289

You can also say.

Safety First - Using the Windows String Safe Functions

디바이스 드라이버
2009/03/13 17:07
 

Unless you have had your head in a hole for the last couple of years, you have undoubtedly heard about Microsoft fixing security holes in Windows kernel mode code.    Many of the problems they encountered had to do with string handling functions, for example strcat, strcpy, and their related c-runtime library functions (CRT) .   The weakness in these functions is that no buffer lengths are specified, so it is very easy for a user to copy a long string into a short buffer and thus corrupt memory or worse, cause some unhandled exception.    Buffer overruns have even been used as security attacks.  To fix this class of problem Microsoft created a safer set of functions called the "String Safe" Functions.  These relatively recent functions (XP SP1), to no one's surprise, add parameters to describe the length of the string buffers, to reduce the chance that buffers are overflowed

When Microsoft created the string safe functions they created two sets of functions.    One set uses byte counts to describe buffer lengths, while the other set of functions uses character counts to describe the buffer lengths.   Byte Count related functions always contain "Cb" (for count in bytes) in the name, for example RtlStringCbCat.  The character count related functions always contain "Cch" (for count in characters) in the name, for example RtlStringCchCat.   The type of function to use is entirely up to you.

Now, it is nice to know that Windows provides these functions, and some of the advantages are probably already evident to you.  However, let's review some of the major benefits to using these newer functions: Since you are providing the correct size of the destination buffer this ensures that the function will not write past the end of the input buffer.  All string safe functions guarantee that the output buffers are null terminated, even if the operation truncates the intended result.

All the string safe functions return an NTSTATUS, with the only possible success code being STATUS_SUCCESS (there are, of course, several possible error codes).
Each string handling function has both a Cch and Cb variant available for use.
Most functions have an extended "Ex" version which provides extended functionality.

String Safe Character Count Functions

Table 1 lists the character count string safe functions provided in "strsafe.h" and the c-runtime functions (CRT) functions they are intended to replace.


Table 1

String Safe Byte Count Functions

Table 2 lists the byte count string safe functions provided in "strsafe.h" and the c-runtime functions (CRT) functions they are intended to replace.

Table 2

Unicode Strings
At this point I probably have given you the impression that the string safe functions are only intended to replace c-runtime functions. That is not true. The string safe functions include many functions, of both Cch and Cb variants, to help you with Unicode strings also. The list below contains the functions provided:

  • RtlUnicodeStringXxxCatN, RtlUnicodeStringXxxCatNEx
  • RtlUnicodeStringXxxCatStringN, RtlUnicodeStringXxxCatStringNEx
  • RtlUnicodeStringXxxCopyN, RtlUnicodeStringXxxCopyNEx
  • RtlUnicodeStringXxxCopyStringN, RtlUnicodeStringXxxCopyStringNEx

Example

Let us assume for the moment that you need to write a function to generate the full name of a file from an input full directory path and the handle to a file. Furthermore, we will also assume that we will never see a long path name, because everyone must be like us and hate to have long file names. Thus the function that you may write to handle this could be as shown in Figure 1.

wchar* GenerateFullPath(wchar* fulldirPath,HANDLE File)
{
 static wchar dirname[100];  // assume you think all paths are small
 wchar* fileName = NULL;
 
 ASSERT(fulldirPath);
 ASSERT(File);
 
 fileName = GetFileName(File); // Get the name of the input file
 strcpy(dirname,fulldirPath);  // copy the input dir name
 strcat(dirname,L"\\");  // append a \ to the name
 strcat(dirname,fileName); // concatenate the filename
 
 return dirname;        // return the full path to the caller.
}

Figure 1

If you analyze this code, I am sure that you can see a great many faults that could occur in this code. Most of them center around overrunning the dirname buffer since we forgot to look at the string lengths of the buffers we were concatenating from. A better solution to this function could be either Figure 2 or Figure 3, one illustrating the use of the Cch version of the string safe functions (Figure 2)and the other using the Cb version (Figure 3).

wchar* GenerateFullPath(wchar* fulldirPath,HANDLE File)
{
 static wchar dirname[MAX_PATH];
 wchar*   fileName = NULL;
 NTSTATUS  status;
 
 ASSERT(fulldirPath);
 ASSERT(File);
 
 ASSERT(MAX_PATH <= STRSAFE_MAX_CCH);
 
 fileName = GetFileName(File);  // Get the name of the input file
 
 status = RtlStringCchCopyW(dirname,MAX_PATH,fulldirPath);
 if(!NT_SUCCESS(status) {
  return NULL;
 }
 status = RtlStringCchCatW(dirname,MAX_PATH,L"\\");
 if(!NT_SUCCESS(status) {
  return NULL;
 }
 status = RtlStringCchCatW(dirname,MAX_PATH,fileName);
 if(!NT_SUCCESS(status) {
  return NULL;
 }
 return dirname;  // return the full path to the caller.
}

Figure 2 - Cch String Safe Usage

wchar* GenerateFullPath(wchar* fulldirPath,HANDLE File)
{
 static wchar dirname[MAX_PATH];
 wchar*   fileName = NULL;
 NTSTATUS  status;
 
 ASSERT(fulldirPath);
 ASSERT(File);
 
 ASSERT(MAX_PATH <= STRSAFE_MAX_CCH);
 
 fileName = GetFileName(File);  // Get the name of the input file
 
 status = RtlStringCbCopyW(dirname,MAX_PATH*sizeof(WCHAR),fulldirPath);
 if(!NT_SUCCESS(status) {
  return NULL;
 }
 status = RtlStringCbCatW(dirname,MAX_PATH*sizeof(WCHAR),L"\\");
 if(!NT_SUCCESS(status) {
  return NULL;
 }
 status = RtlStringCbCatW(dirname,MAX_PATH*sizeof(WCHAR),fileName);
 if(!NT_SUCCESS(status) {
  return NULL;
 }
 return dirname;  // return the full path to the caller.
}
 


Figure 3 - Cb String Safe Usage

As you notice with the Cch and Cb versions of the function, the main difference is that the size of the destination buffer is specified in each call. This provides the string safe functions with the ability to ensure that the destination buffer is not overrun. In addition, the functions return a status so that we can be sure to terminate function processing if an error occurs.

Building Your Code

In order to build your code correctly, you may want to know about the compile time variables that you can define to allow you to optimize how you use the string safe functions.

STRSAFE_LIB

If you want to use the string safe functions in library form then define STRSAFE_LIB before including "strsafe.h" in your code. In addition, you will need to insure that you link your code against "$(SDK_LIB_PATH)\strsafe.lib". Why do this? Well, instead of including the string safe routines that you use in your binary, this allows your driver to dynamically bind to the string safe functions when it loads, hopefully allowing you to be running against the latest most improved implementations of these functions. This can be both good and bad.

Example:

#define STRSAFE_LIB
#include <strsafe.h>

If you don't define STRSAFE_LIB in your code, the current revision of the string safe functions will be compiled as part of your driver code (i.e., the implementations of the routines will be compiled as part of "strsafe.h"), and you do not need to link against strsafe.lib

STRSAFE_NO_DEPRECATE

Normally when you include "strsafe.h" all older functions (c-runtime functions) that are replaced by "strsafe.h" defined functions are deprecated, i.e. you are given warnings that that the functions are not to be used and you are urged to use their string safe equivalents.   If for some unknown reason you have to use one of these functions, you should define STRSAFE_NO_DEPRECATE.  This definition will suppress the warnings and allow you to compile your driver.

Example:

#define STRSAFE_NO_DEPRECATE
#include <strsafe.h>

STRSAFE_NO_CB_FUNCTIONS

If for some reason you want to limit your code to only use character count related string safe functions, then you should define STRSAFE_NO_CB_FUNCTIONS. This definition will then limit your code to the use of the RtlStringCchxxx functions.

Example:

#define STRSAFE_NO_CB_FUNCTIONS
#include <strsafe.h>

STRSAFE_NO_CCH_FUNCTIONS

Similarly, the STRSAFE_NO_CCH_FUNCTIONS define allows you to limit your code to only use byte count related string functions. Using this definition will then limit your code to use of the RtlStringCbxxx functions.

Example:

#define STRSAFE_NO_CCH_FUNCTIONS
#include <strsafe.h>

Summary

While it may seem like a hassle to learn a new set of functions to replace the old c-runtime functions that we have grown to love, it really is in your best interest to change.   The string safe functions provided in "strsafe.h" provide you with a robust set of functions which will make your driver safer from buffer overruns and silly string mistakes that we all tend to make.

출처 : OSR Online

크리에이티브 커먼즈 라이센스
Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
No received trackback. / No comment.

Trackback Address :: http://sinwoong.co.kr/trackback/288

You can also say.

Prev 1 2 3 4 5 6 7 8 9 ... 143 Next
달빛는 지금.. 파이팅파이팅
C와 Assembly를 제2외국어로...
남자RH+ O형사수자리경기도

카테고리

  • 전체 (285)
    • Project HSL (2)
    • Project Talk (8)
    • 생각 (16)
    • 일상 (18)
    • 정보/스크랩 (64)
    • 용어사전 (4)
    • IT외부행사 (15)
    • ASSEMBLY (7)
    • Win32 API/MFC (29)
    • Hacking/Virus/Vaccine (24)
    • 관심거리 (3)
    • 스킨/플러그인 (2)
    • 시간 죽이기 (2)
    • 천연 비누/화장품 (10)
    • Windows Server 2008 (57)
    • 디바이스 드라이버 (23)
    • 카드 (1)
    • 지식베이스캠프 (0)
    • 소프트캠프 업무 일지 (0)

태그목록

  • 프리웨어
  • 헤더
  • Code Red Worm
  • Window I/O
  • 유니코드
  • Terminal Services
  • IPSec
  • 공유
  • 보안프로그래밍
  • Diamond Mine
  • 수업거부
  • 로드맵
  • 휴대용 저장장치 보안
  • C
  • 버퍼오버플로우.
  • C/C++ Reference
  • HDD
  • 도메인
  • Detours Express
  • VIA
  • 이메일
  • GDI+
  • 버퍼 오버플로우
  • 악성 툴바
  • 보호
  • 피부
  • CISM
  • 의미
  • SEK2007
  • 홈페이지 보안

최근에 올라온 글

  • ExitProcess(), Termina....
  • C/C++ 격리된 응용 프로....
  • EnumPrinters.
  • 알고 있어야 도움이 되....
  • Microsoft Windows XP....

최근에 달린 댓글

  • 좋은 자료 감사합니다.. Minjong Kim 08/09
  • 학습로드맵 잘 보고 갑.... Minjong Kim 08/09
  • 잘보고 갑니다 : ). hothead 07/16
  • 좋은 글 잘읽었습니다. ^^. Rhea君 05/06
  • 좋은 소프트웨어네여. montreal florist 01/12

최근에 받은 트랙백

  • Windows 시스템 실행파.... 김재호의 디지털보단 아... 02/14
  • 스레드만 사용하면 컴퓨.... 철없는강아지의 블로그 2008
  • 언제 다이어그램을 그려.... 너구리의 프로그래밍 세계 2007
  • 국내 웹환경에 기대를.... *~アスタリスク~ 2007
  • [플러그인] IS Flash Vi.... ISCUBIX.COM 2007

글 보관함

  • 2010/06 (1)
  • 2010/03 (2)
  • 2009/09 (1)
  • 2009/04 (2)
  • 2009/03 (5)

달력

«   2010/09   »
일 월 화 수 목 금 토
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

링크

  • IT 용어사전.
  • Total : 288481
  • Today : 17
  • Yesterday : 245
Tattertools
Eolin
rss

달빛's blog is powered byTattertools1.5.3.1 : Adamantine
Skin by Nyangkum