SourceForge Ticket System
norep****@sourc*****
2012年 11月 14日 (水) 17:52:38 JST
#30083: Avoid overflow of "int" in the "MallocerFrrer" Open Date: 2012-11-13 12:26 Last Update: 2012-11-14 17:52 URL for this Ticket: http://sourceforge.jp/ticket/browse.php?group_id=6231&tid=30083 RSS feed for this Ticket: http://sourceforge.jp/ticket/ticket_rss.php?group_id=6231&tid=30083 --------------------------------------------------------------------- Last Changes/Comment for this Ticket: 2012-11-14 17:52 Update by: mikiya_fujii * Ticket Close date set to 2012-11-14 17:52 * 状況 Update from オープン to 完了. * 解決法 Update from なし to 修正済み. Comment: Fixed at r1117. Then MallocerFreer is refactored at r1118. --------------------------------------------------------------------- Ticket Status: Reporter: mikiya_fujii Owner: mikiya_fujii Type: パッチ Status: 完了 Priority: 6 MileStone: ver0.2 Component: (未割り当て) Severity: 6 Resolution: 修正済み --------------------------------------------------------------------- Ticket details: 1)Type of arguments for size of array is modified to size_t from int[[BR]] 2)To avoid overflow, way to calculate "requiredMalloc" is modified to [[BR]] {{{ double requiredMalloc = static_cast<double>(size1); *static_cast<double>(size2); *static_cast<double>(sizeof(T)); }}} 3)To check the amount of allocated heap in more detail, variables for address should be counted in the "requiredMalloc" -- This is Ticket on Project MolDS. MolDS Project hosted on SourceForge.JP. Project URL: http://sourceforge.jp/projects/molds SourceForge.JP: http://sourceforge.jp URL for this Ticket: http://sourceforge.jp/ticket/browse.php?group_id=6231&tid=30083 RSS feed for this Ticket: http://sourceforge.jp/ticket/ticket_rss.php?group_id=6231&tid=30083