summaryrefslogtreecommitdiff
path: root/mysys/safemalloc.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-07-18 04:04:24 +0300
committerunknown <monty@narttu.mysql.fi>2003-07-18 04:04:24 +0300
commit06517dfed3505981105d892e036e36d32c23c9aa (patch)
tree6daa5670b9fcf6d6a667f2f4af5a9ac7e1d44770 /mysys/safemalloc.c
parent6159cd27bfe9d24e610c7a25f8e0d991abd9caff (diff)
downloadmariadb-git-06517dfed3505981105d892e036e36d32c23c9aa.tar.gz
Fixed memory overrun when doing REPAIR on table with multi-part auto_increment key where one part was a packed CHAR
myisam/mi_check.c: Fixed memory overrun in _mi_put_key_in_record myisam/mi_key.c: Fixed unnecessary memory allocation mysql-test/r/insert_select.result: Added test case for memory corruption mysql-test/t/insert_select.test: Added test case for memory corruption mysys/safemalloc.c: Removed compiler warnings sql/sql_acl.cc: Fixed core dump when running with --debug
Diffstat (limited to 'mysys/safemalloc.c')
-rw-r--r--mysys/safemalloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index bd77b4821ff..07c40fd91b6 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -374,11 +374,11 @@ void TERMINATE(FILE *file)
{
if (file)
{
- fprintf(file, "Warning: Not freed memory segments: %d\n",
+ fprintf(file, "Warning: Not freed memory segments: %u\n",
sf_malloc_count);
(void) fflush(file);
}
- DBUG_PRINT("safe",("sf_malloc_count: %d", sf_malloc_count));
+ DBUG_PRINT("safe",("sf_malloc_count: %u", sf_malloc_count));
}
/*
@@ -482,7 +482,7 @@ int _sanity(const char *filename, uint lineno)
pthread_mutex_lock(&THR_LOCK_malloc);
#ifndef PEDANTIC_SAFEMALLOC
- if (sf_malloc_tampered && sf_malloc_count < 0)
+ if (sf_malloc_tampered && (int) sf_malloc_count < 0)
sf_malloc_count=0;
#endif
count=sf_malloc_count;