From: <ta...@us...> - 2010-01-26 11:35:55
|
Revision: 4334 http://gfarm.svn.sourceforge.net/gfarm/?rev=4334&view=rev Author: tatebe Date: 2010-01-26 11:35:47 +0000 (Tue, 26 Jan 2010) Log Message: ----------- (gfarm_error_string) fix possible out-of-bounds array access, pointed out by Enami-san Modified Paths: -------------- gfarm_v2/trunk/lib/libgfarm/gfarm/liberror.c Modified: gfarm_v2/trunk/lib/libgfarm/gfarm/liberror.c =================================================================== --- gfarm_v2/trunk/lib/libgfarm/gfarm/liberror.c 2010-01-26 08:46:24 UTC (rev 4333) +++ gfarm_v2/trunk/lib/libgfarm/gfarm/liberror.c 2010-01-26 11:35:47 UTC (rev 4334) @@ -465,6 +465,8 @@ struct gfarm_error_domain *domain; int i; + if (error < 0) + return (errcode_string[GFARM_ERR_UNKNOWN]); if (error < GFARM_ERR_NUMBER) return (errcode_string[error]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |