[patch] Fixing segfault-causing off-by-one error in index.c
Nirgal <[email protected]> Mon, 15 Aug 2011 08:03:05 +0000
| Newsgroups | gmane.comp.db.mdb-tools.devel |
|---|---|
| Message-ID | <[email protected]> |
Attached if a patch for an index overflow. Found on github, and not published on that list before as far as I can tell. ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ mdbtools-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mdbtools-dev
one-off-index.diff
(text/x-patch, 698 B)
Author: Mark Williams <[email protected]> Date: 2011-04-01 Description: Fixing segfault-causing off-by-one error in index.c Index: mdbtools-0.6pre1/src/libmdb/index.c =================================================================== --- mdbtools-0.6pre1.orig/src/libmdb/index.c +++ mdbtools-0.6pre1/src/libmdb/index.c @@ -167,7 +167,7 @@ /* here we have the internal column number that does not * always match the table columns because of deletions */ cleaned_col_num = -1; - for (k=0; k<=table->num_cols; k++) { + for (k=0; k<table->num_cols; k++) { MdbColumn *col = g_ptr_array_index(table->columns,k); if (col->col_num == col_num) { cleaned_col_num = k;