From: <svn...@op...> - 2010-10-12 13:10:41
|
Author: bellmich Date: Tue Oct 12 15:10:30 2010 New Revision: 230 URL: http://libwbxml.opensync.org/changeset/230 Log: Fixed unsigned integer overflow (patch from ticket #41) The overflow causes crashs or wrong wbxml messages. Modified: wbxml2/trunk/ChangeLog wbxml2/trunk/src/wbxml_parser.c Modified: wbxml2/trunk/ChangeLog ============================================================================== --- wbxml2/trunk/ChangeLog Tue Oct 12 12:18:09 2010 (r229) +++ wbxml2/trunk/ChangeLog Tue Oct 12 15:10:30 2010 (r230) @@ -1,5 +1,7 @@ - * Fixed MS VisualStudio 2008 issue with variable definitions - (committed changes from ticket #42) + * Fixed unsigned integer overflow (patch from ticket #41) + The overflow causes crashs or wrong wbxml messages. + * Fixed location of variable definitions (changes from ticket #42) + This fixes some compiler errors from MS VisualStudio 2008. 2010-03-29 Michael Bell <mic...@we...> * Released 0.10.8 Modified: wbxml2/trunk/src/wbxml_parser.c ============================================================================== --- wbxml2/trunk/src/wbxml_parser.c Tue Oct 12 12:18:09 2010 (r229) +++ wbxml2/trunk/src/wbxml_parser.c Tue Oct 12 15:10:30 2010 (r230) @@ -763,7 +763,7 @@ if (strtbl_len > 0) { /* Check this string table length */ - if (parser->pos + strtbl_len > wbxml_buffer_len(parser->wbxml)) + if (strtbl_len > wbxml_buffer_len(parser->wbxml) - parser->pos) return WBXML_ERROR_STRTBL_LENGTH; /* Get String Table */ |