일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- DOCKER-USER
- cbpf
- epoll_wait
- epoll
- rfc5508
- ioctl
- ncurses
- wnourefresh
- C언어
- architecture
- Compiler
- 어셈블리어
- REDIS
- vtable
- NAPT
- edge trigger
- LOB
- doupdate
- 풀이
- level trigger
- iptables
- .net core 7
- Docker
- packet filter
- wrefresh
- mvwin
- BOF
- packet flow
- 취약점
- .nret core 배포
- Today
- Total
Tuuna Computer Science
첨에 찾은게 아래 방식이여서 이방식을 계속사용하다가 case WM_CREATE : // Get the handle to the client area's device context. hdc = GetDC (hWnd); // Extract font dimensions from the text metrics. GetTextMetrics (hdc, &tm); xChar = tm.tmAveCharWidth; xUpper = (tm.tmPitchAndFamily & 1 ? 3 : 2) * xChar/2; yChar = tm.tmHeight + tm.tmExternalLeading; // Free the device context. ReleaseDC (hWnd, hdc); // Set an arbitrary maxi..
1-day 리눅스 커널 취약점 찾기 스터디중에 container_of 매크로랑 offsetof매크로를 분석하라는 과제를 받음. 구글링하다가 위 둘 매크로는 디바이스 드라이버 제잘할 때 자주 사용하는 매크로임을 깨달음. 분석에 앞서 ㅈㄴ 괴기하다. [ offsetof 매크로 (부모 구조체를 기준으로 멤버의 오프셋 구함) ] #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif offsetof 매크로의 경우 구조체 타입과 오프셋을 원한 구조체 멤버를 받음 ((size_t)&((TYPE *)0)->MEMBER) 코드를 보면 0이라는 값을 TYPE*형으로 치환한다음이 것이 MEMBER을 가리키고 이 주소값을 반..

수정) read_ptr은 선언된 버퍼의 크기라기 보단, fgets인자로 준 size값에 따르는 듯? lob풀다가 갑자기 Stdin에 관해서 한 번 분석해보고 싶어서 글을 쓰지만 별로 분석한건 없는 거 같다... 초짜라 뭘 봐야할지도 잘 모르겠고 ㅋㅋㅋ stdio.c 이고 #include "libioP.h" #include "stdio.h" #undef stdin #undef stdout #undef stderr FILE *stdin = (FILE *) &_IO_2_1_stdin_; FILE *stdout = (FILE *) &_IO_2_1_stdout_; FILE *stderr = (FILE *) &_IO_2_1_stderr_; stdin에 대한 구조체 정의 부분이다. struct _IO_FILE { i..