/* The limit value will normally, but not necessarily, be an
* expression in kilo-bytes, mega-bytes, or giga-bytes. Even
* when the limit doesn't refer to kilo-byte units, treat it
* as such for the qualifiers. Ignore anything larger since
* it will overflow unsigned long on 32-bit systems.
*/
switch (ap_toupper(*limit)) {
default:
return "Invalid units for limit.";
case 'G':
config->limit *= 1024;
case 'M':
config->limit *= 1024;
case 'K': case '\0':
break;
}
it will overflow unsigned long on 32-bit systems.
range: 0 - 2^32-1
수년간 사용해온 소스에 버그가 있었다.
apache 1.3 에서 많이 사용되는 mod_throttle 소스에
중대한 버그가 있다.
'programming' 카테고리의 다른 글
eclipse에서 VI 로 JAVA 코딩하기 (0) | 2010.05.21 |
---|---|
rpcgen (0) | 2010.04.08 |
IRIX® Network Programming Guide (0) | 2010.04.08 |
endian check code (0) | 2010.03.31 |
Kdevelop - Doxygen (0) | 2010.02.04 |
Latest update: 2010. 2. 19. 13:53