summaryrefslogtreecommitdiff
path: root/regex
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-08-031-0/+4
|\ | | | | | | without a fix for Bug#12818255 (MDEV-6581)
| * Bug#23498283 - BUFFER OVERFLOWShishir Jaiswal2016-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in Regex library. This can be triggered when the data corresponding to argv[1] is >= 512 bytes resutling in abnormal behaviour. ANALYSIS ======== Its a straight forward case of SEGFAULT where the target buffer is smaller than the source string to be copied. A simple pre-copy validation should do. FIX === A check is added before doing strcpy() to ensure that the target buffer is big enough to hold the to-be copied data. If the check fails, the program aborts.
| * Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in a lot of code sections spanning across server, client programs, Regex libraries etc. If not handled appropriately, they can cause abnormal behaviour. ANALYSIS ======== The reported casea are the ones which are likely to result in SEGFAULT, MEMORY LEAK etc. FIX === - sprintf() has been replaced by my_snprintf() to avoid buffer overflow. - my_free() is done after checking if the pointer isn't NULL already and setting it to NULL thereafter at few places. - Buffer is ensured to be large enough to hold the data. - 'unsigned int' (aka 'uint') is replaced with 'size_t' to avoid wraparound. - Memory is freed (if not done so) after its alloced and used. - Inserted assert() for size check in InnoDb memcached code (from 5.6 onwards) - Other minor changes
* | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-06-141-0/+4
|\ \
| * | Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-161-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in a lot of code sections spanning across server, client programs, Regex libraries etc. If not handled appropriately, they can cause abnormal behaviour. ANALYSIS ======== The reported casea are the ones which are likely to result in SEGFAULT, MEMORY LEAK etc. FIX === - sprintf() has been replaced by my_snprintf() to avoid buffer overflow. - my_free() is done after checking if the pointer isn't NULL already and setting it to NULL thereafter at few places. - Buffer is ensured to be large enough to hold the data. - 'unsigned int' (aka 'uint') is replaced with 'size_t' to avoid wraparound. - Memory is freed (if not done so) after its alloced and used. - Inserted assert() for size check in InnoDb memcached code (from 5.6 onwards) - Other minor changes (cherry picked from commit 3487e20959c940cbd24429afa795ebfc8a01e94f)
* | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2015-12-091-6/+11
|\ \ | |/
| * Bug#21973610: BUFFER OVERFLOW ISSUESHarin Vadodaria2015-11-061-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Reviewed-By : Venkata S Murthy Sidagam <venkata.sidagam@oracle.com>
* | Merge tag 'mysql-5.5.45' into 5.5Sergei Golubchik2015-08-011-1/+23
|\ \ | |/
| * Bug#20642505: HENRY SPENCER REGULAR EXPRESSIONS (REGEX) LIBRARYTatiana Azundris Nuernberg2015-05-181-1/+23
| | | | | | | | | | | | | | | | | | | | The MySQL server uses Henry Spencer's library for regular expressions to support the REGEXP/RLIKE string operator. This changeset adapts a recent fix from the upstream for better 32-bit compatiblity. (Note that we cannot simply use the current upstream version as a drop-in replacement for the version used by the server as the latter has been extended to understand MySQL charsets etc.)
| * BUG#14303860 - EXECUTING A SELECT QUERY WITH TOO Neeraj Bisht2013-01-142-2/+2
| |\ | | | | | | | | | MANY WILDCARDS CAUSES A SEGFAULT Back port from 5.6 and trunk
| | * BUG#14303860 - EXECUTING A SELECT QUERY WITH TOO Neeraj Bisht2013-01-142-2/+2
| | | | | | | | | | | | | | | MANY WILDCARDS CAUSES A SEGFAULT Back port from 5.6 and trunk
| | * Updated/added copyright headersKent Boortz2011-06-301-1/+2
| | |\
| * | \ Merge from mysql-5.1 for bug#58026.Dmitry Shulga2011-02-043-4/+21
| |\ \ \ | | |/ /
| | * | Fixed bug#58026 - massive recursion and crash in regular expressionDmitry Shulga2011-02-043-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handling. The problem was that parsing of nested regular expression involved recursive calls. Such recursion didn't take into account the amount of available stack space, which ended up leading to stack overflow crashes.
| * | | WL#5665: Removal of the autotools-based build systemDavi Arnaut2010-11-201-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced.
| * | | Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.Davi Arnaut2010-11-161-2/+3
| |\ \ \ | | |/ /
| | * | Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failureDavi Arnaut2010-11-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c Bug#57994: Compiler flag change build error : my_redel.c Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc Fix assorted compiler generated warnings.
| * | | Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.Davi Arnaut2010-10-191-4/+4
| |\ \ \ | | |/ /
| | * | Bug#45288: pb2 returns a lot of compilation warningsDavi Arnaut2010-10-191-4/+4
| | | | | | | | | | | | Tag or remove unused arguments and variables.
| * | | Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).Alexander Nozdrin2010-08-121-3/+2
| | | | | | | | | | | | Fixing copyright text.
| * | | Auto-merge from mysql-trunk-merge.Alexander Nozdrin2010-07-291-10/+7
| |\ \ \
| | * \ \ Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-201-10/+7
| | |\ \ \ | | | |/ /
| | | * | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-201-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
| * | | | WL#5498: Remove dead and unused source codeDavi Arnaut2010-07-231-12/+0
| | | | | | | | | | | | | | | Remove unused macros or macro which are always defined.
| * | | | WL#5498: Remove dead and unused source codeDavi Arnaut2010-07-232-65/+0
| |/ / / | | | | | | | | Remove code that has been disabled for a long time.
| * | | mergeGeorgi Kodinov2010-07-141-3/+3
| |\ \ \ | | |/ /
| | * | Use UNINIT_VAR workaround instead of LINT_INIT.Davi Arnaut2010-07-091-3/+3
| | | |
| * | | Unset the execute bit where it's not needed.Davi Arnaut2010-07-031-0/+0
| | | |
| * | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-021-1/+0
| |\ \ \ | | |/ /
| | * | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apart strict-aliasing warnings, fix the remaining warnings generated by GCC 4.4.4 -Wall and -Wextra flags. One major source of warnings was the in-house function my_bcmp which (unconventionally) took pointers to unsigned characters as the byte sequences to be compared. Since my_bcmp and bcmp are deprecated functions whose only difference with memcmp is the return value, every use of the function is replaced with memcmp as the special return value wasn't actually being used by any caller. There were also various other warnings, mostly due to type mismatches, missing return values, missing prototypes, dead code (unreachable) and ignored return values.
| * | | Patch for Bug#53937 (Junk make-ccc files included in MySQL Server bzr repo).Alexander Nozdrin2010-05-261-3/+0
| | | | | | | | | | | | Remove make-ccc files.
| * | | Another incarnation of the patch for Bug#30708Alexander Nozdrin2010-05-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (make relies GNU extentions). The patch was partially backport from 6.0. Original comment: bug#30708: make relies GNU extensions. Now that we no longer use BitKeeper we can safely remove the SCCS handling with no loss of functionality.
| * | | mergeVladislav Vaintroub2009-12-161-5/+0
| |\ \ \
| | * | | Remove .cvsignore files (attempt #2).Alexander Nozdrin2009-12-161-5/+0
| | | | |
| * | | | Remove STATIC from ADD_CONVENIENCE_LIBRARY on 2 placesVladislav Vaintroub2009-11-251-1/+1
| | | | |
| * | | | implement convenience librariesVladislav Vaintroub2009-11-241-3/+1
| | | | |
| * | | | WL#5161 : Cross-platform build with CMakeVladislav Vaintroub2009-11-092-6/+3
| |/ / /
| * | | Merge from mysql-trunk-merge.Alexander Nozdrin2009-10-191-1/+1
| |\ \ \ | | |/ /
| | * | BUG#47850: too many files built in regex/Magnus Blåudd2009-10-091-1/+1
| | | | | | | | | | | | | | | | - Don't build split.c or debug.c since they are not part of the actual regex library
| * | | Backport http://lists.mysql.com/commits/57778Vladislav Vaintroub2009-09-301-2/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2677 Vladislav Vaintroub 2008-11-04 CMakeLists.txt files cleanup - remove SAFEMALLOC and SAFE_MUTEX definitions that were present in *each* CMakeLists.txt. Instead, put them into top level CMakeLists.txt, but disable on Windows, because a) SAFEMALLOC does not add any functionality that is not already present in Debug C runtime ( and 2 safe malloc one on top of the other only unnecessarily slows down the server) b)SAFE_MUTEX does not work on Windows and have been explicitely disabled on Windows with #undef previously. Fortunately, ntdll does pretty good job identifying l problems with CRITICAL_SECTIONs. DebugBreak()s on using uninited critical section, unlocking unowned critical section) -Also, remove occationally used -D_DEBUG (added by compiler anyway)
| * | Merge from 5.0 for 43414Staale Smedseng2009-08-281-3/+3
| |\ \ | | |/
| | * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 This patch fixes a number of GCC warnings about variables used before initialized. A new macro UNINIT_VAR() is introduced for use in the variable declaration, and LINT_INIT() usage will be gradually deprecated. (A workaround is used for g++, pending a patch for a g++ bug.) GCC warnings for unused results (attribute warn_unused_result) for a number of system calls (present at least in later Ubuntus, where the usual void cast trick doesn't work) are also fixed.
| * | Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>guilhem@gbichot4.local2008-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | value" error even though the value was correct): a C function in my_getopt.c was taking bool* in parameter and was called from C++ sql_plugin.cc, but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny mismatches. Fixed, all other occurences of bool in C are removed, future ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
| * | Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marveljbruehe/mysqldev@mysql.com/production.mysql.com2007-08-161-1/+6
| |\ \ | | | | | | | | | | | | into mysql.com:/data0/mysqldev/my/mysql-5.1-30367
| | * | CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:kent@mysql.com/kent-amd64.(none)2007-08-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional changes for bug#29903 - Changed to do embedded build part as normal build, when WITH_EMBEDDED_SERVER is set. - Allow both normal and debug build with embedded. - Build static embedded library by pointing out all source and compile it all, i.e. not building libraries from libraries, not portable. - Let embedded use generated files from the "sql" directory, added dependencies to make sure built before embedded. - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only linked in when debug target is used. - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as others can't depend on it, not defined at configure time. Instead set the output file name. - Created work around for bug in CMake 2.4.6 and output names, to set the "mysqld<suffix>.pdb" name to the same base name. - Set the correct manifest "name" (patch by iggy)
| * | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@narttu.mysql.fi2007-08-141-2/+2
| |\ \ \ | | |/ / | |/| | | | | | into mysql.com:/home/my/mysql-5.1
| | * | Fixed a lot of compiler warnings and errors detected by Forte C++ on Solarismonty@mysql.com/nosik.monty.fi2007-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
| * | | Fix a bad BitKeeper dependency structure for the "CMakeLists.txt" files.joerg@trift2.2007-07-311-0/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They had been introduced in 5.1 and were only later backported to 5.0; as a consequence, the files in the 5.1 tree do not depend on the 5.0 ones, and changes in 5.0 do not propagate into the 5.1 files. To fix this, the (previous) files in 5.1 now are deleted ("bk rm"), and the previously deleted files depending on 5.0 are now moved to the respective source directories ("bk mv"). The current 5.1 contents is restored in these files. If you need the previous history of the 5.1 files ("bk revtool"), access those in "BitKeeper/deleted". Contrary to the original plan, I did not introduce the name "CMakeLists.historic" - mostly in order not to clutter the source tree. This fixes bug#29982.
| * | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (first part) The following type conversions was done: - Changed byte to uchar - Changed gptr to uchar* - Change my_string to char * - Change my_size_t to size_t - Change size_s to size_t Removed declaration of byte, gptr, my_string, my_size_t and size_s. Following function parameter changes was done: - All string functions in mysys/strings was changed to use size_t instead of uint for string lengths. - All read()/write() functions changed to use size_t (including vio). - All protocoll functions changed to use size_t instead of uint - Functions that used a pointer to a string length was changed to use size_t* - Changed malloc(), free() and related functions from using gptr to use void * as this requires fewer casts in the code and is more in line with how the standard functions work. - Added extra length argument to dirname_part() to return the length of the created string. - Changed (at least) following functions to take uchar* as argument: - db_dump() - my_net_write() - net_write_command() - net_store_data() - DBUG_DUMP() - decimal2bin() & bin2decimal() - Changed my_compress() and my_uncompress() to use size_t. Changed one argument to my_uncompress() from a pointer to a value as we only return one value (makes function easier to use). - Changed type of 'pack_data' argument to packfrm() to avoid casts. - Changed in readfrm() and writefrom(), ha_discover and handler::discover() the type for argument 'frmdata' to uchar** to avoid casts. - Changed most Field functions to use uchar* instead of char* (reduced a lot of casts). - Changed field->val_xxx(xxx, new_ptr) to take const pointers. Other changes: - Removed a lot of not needed casts - Added a few new cast required by other changes - Added some cast to my_multi_malloc() arguments for safety (as string lengths needs to be uint, not size_t). - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done explicitely as this conflict was often hided by casting the function to hash_get_key). - Changed some buffers to memory regions to uchar* to avoid casts. - Changed some string lengths from uint to size_t. - Changed field->ptr to be uchar* instead of char*. This allowed us to get rid of a lot of casts. - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar - Include zlib.h in some files as we needed declaration of crc32() - Changed MY_FILE_ERROR to be (size_t) -1. - Changed many variables to hold the result of my_read() / my_write() to be size_t. This was needed to properly detect errors (which are returned as (size_t) -1). - Removed some very old VMS code - Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix) - Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe. Updated function comment to reflect this. Changed function that depended on original behavior of my_pwrite() to itself restore the cursor position (one such case). - Added some missing checking of return value of malloc(). - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow. - Changed type of table_def::m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length. - Moved THD::max_row_length() to table.cc (as it's not depending on THD). Inlined max_row_length_blob() into this function. - More function comments - Fixed some compiler warnings when compiled without partitions. - Removed setting of LEX_STRING() arguments in declaration (portability fix). - Some trivial indentation/variable name changes. - Some trivial code simplifications: - Replaced some calls to alloc_root + memcpy to use strmake_root()/strdup_root(). - Changed some calls from memdup() to strmake() (Safety fix) - Simpler loops in client-simple.c
| * | Many files:kent@mysql.com/kent-amd64.(none)2006-12-311-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Added GPL copyright text my_vle.h, rpl_utility.h, my_vle.c, base64-t.c, rpl_utility.cc: Changed copyright header formatting some plugin_example.c, daemon_example.c: Added "Copyright (C) 2006 MySQL AB" to GPL header