summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-01-18 17:36:20 -0700
committerunknown <sasha@mysql.sashanet.com>2001-01-18 17:36:20 -0700
commit1ad779d47c5e7b1e4e044053f9fa8bca71ac9e2b (patch)
tree6be6f043d9869e97211581cece15de29cc37352f /extra
parentc862fa36467651ef3e3cb3acad61e42fc0b3e07c (diff)
downloadmariadb-git-1ad779d47c5e7b1e4e044053f9fa8bca71ac9e2b.tar.gz
fixed buffer overrun in resolve_stack_dump
fixes for restore table test case for backup/restore extra/resolve_stack_dump.c: fixed buffer overrun mysql-test/t/rpl000004.test: updated load table from master test case sql/ha_myisam.cc: verbose error messages during backup table, very silent repair on restore sql/sql_table.cc: fixed bugs in restore table
Diffstat (limited to 'extra')
-rw-r--r--extra/resolve_stack_dump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index 798c9618c66..5bfdd22f8fc 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -159,7 +159,7 @@ static uchar hex_val(char c)
l = tolower(c);
if(l < 'a' || l > 'f')
return HEX_INVALID;
- return 10 + c - 'a';
+ return (uchar)10 + ((uchar)c - (uchar)'a');
}
static my_long_addr_t read_addr(char** buf)
@@ -189,7 +189,7 @@ static int init_sym_entry(SYM_ENTRY* se, char* buf)
/* empty - skip more space */;
--buf;
/* now we are on the symbol */
- for(p = se->symbol, p_end = se->symbol + sizeof(se->symbol);
+ for(p = se->symbol, p_end = se->symbol + sizeof(se->symbol) - 1;
*buf != '\n' && *buf; ++buf,++p )
{
if(p < p_end)
@@ -203,7 +203,7 @@ static int init_sym_entry(SYM_ENTRY* se, char* buf)
static void init_sym_table()
{
- char buf[256];
+ char buf[512];
if(init_dynamic_array(&sym_table, sizeof(SYM_ENTRY), INIT_SYM_TABLE,
INC_SYM_TABLE))
die("Failed in init_dynamic_array() -- looks like out of memory problem");
@@ -236,7 +236,7 @@ static void verify_sort()
get_dynamic(&sym_table, (gptr)&se, i);
if(se.addr < last)
die("sym table does not appear to be sorted, did you forget \
---numeric-sort arg to nm");
+--numeric-sort arg to nm? trouble addr = %p, last = %p", se.addr, last);
last = se.addr;
}
}