분류 전체보기 372

Safe String Reference

C/C++ 문자열 관련 함수는 buffer overflow 취약점을 가지고 있다. 이에 MS에서 Safe String Reference를 제공한다. 프로젝트를 진행중에 _vsnwprintf 함수의 buffer overflow문제가 발생하기도 했다. 다음은 C/C++문자열을 Safe String Reference로 변경의 호환이다. ------------------------------------------------------------------------- 1. StringCchCat() strcat, wcscat, lstrcat, StrCatBuff, _tcscat, _ftcscat 2. StringCchCatN() strncat, StrNCat 3. StringCchCopy() strcpy, wc..

STL, ATL, WTL

STL은 Standarad Template Library, 즉 template 기법을 이용해 만들어진 표준화된 library라고 볼 수 있습니다. 자료구조론을 공부하다보면 배우게 되는 queue, list, hashmap, vector 등과 같은 container와 sort collection, generic 알고리즘과 같은 algorithim이 있고, string을 통한 문자열 접근, exception handling, auto_ptr의 스마트 포이터 등의 기능들을 표준화해 놓은 것입니다. 대부분의 C++ Compiler는 이 STL을 지원하고 있으면, 이는 linux, unix, windows, macos 등 플랫폼에 상관없이 지원되고 있습니다. http://en.wikipedia.org/wiki/S..