Permalink
Browse files

Fixed chooseParser(In &, const char *) function.

There was incorrectly set types_map_len variable which holds length of
types_map array. For cycle in chooseParser() then went out of bounds and
some unallocated memory was dereferenced which caused segfault.
  • Loading branch information...
danfis committed Sep 2, 2009
1 parent 99631cf commit 83f9bed114df8ada0fc75c59d6675e8fa0982b3c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/parser/choose_parser.cpp
@@ -76,7 +76,7 @@ struct TypesMapping {
/**
* Length of array types_map - statically initialized.
*/
int types_map_len = sizeof(types_map) / sizeof(const char *);
int types_map_len = sizeof(types_map) / sizeof(TypesMapping);

0 comments on commit 83f9bed

Please sign in to comment.