svnno****@sourc*****
svnno****@sourc*****
2011年 3月 22日 (火) 17:13:11 JST
Revision: 444 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=444 Author: yoya Date: 2011-03-22 17:13:11 +0900 (Tue, 22 Mar 2011) Log Message: ----------- author: yoya trans_table_set で負のオフセットを渡された時のガードを入れた Modified Paths: -------------- trunk/src/trans_table.c -------------- next part -------------- Modified: trunk/src/trans_table.c =================================================================== --- trunk/src/trans_table.c 2011-03-22 08:08:52 UTC (rev 443) +++ trunk/src/trans_table.c 2011-03-22 08:13:11 UTC (rev 444) @@ -49,6 +49,9 @@ } int trans_table_set(trans_table_t *trans_table, int offset, int cid) { + if (offset < 0) { + return -1; + } if (trans_table->table_num <= offset) { if (trans_table_realloc(trans_table, offset)) { return 1; // failed