summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2009-06-29 21:29:30 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-06-29 21:29:30 (GMT)
commit5be37dcba1950fe6d917c18c9bd1983cb0f17185 (patch) (unidiff)
tree1c0e4dca3c07e51fec05fbbd5079a0450d5c3709
parent6dcecd5893d71dfcda15228f8b17dc26d775f0e8 (diff)
downloadmailfromd-5be37dcba1950fe6d917c18c9bd1983cb0f17185.tar.gz
mailfromd-5be37dcba1950fe6d917c18c9bd1983cb0f17185.tar.bz2
Bugfix.
* mfd/bi_dns.m4 (dns_getname): Missed call to MF_OBSTACK_BEGIN. * mfd/prog.c (runtime_stack_trace): Prevent coredump on arriving to pc == 0.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mfd/bi_dns.m41
-rw-r--r--mfd/prog.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/mfd/bi_dns.m4 b/mfd/bi_dns.m4
index a3a6ef1..6d071e7 100644
--- a/mfd/bi_dns.m4
+++ b/mfd/bi_dns.m4
@@ -131,6 +131,7 @@ MF_DEFUN(dns_getname, STRING, STRING ipstr)
131 131
132 qsort(names, ncount, sizeof names[0], hostname_cmp); 132 qsort(names, ncount, sizeof names[0], hostname_cmp);
133 133
134 MF_OBSTACK_BEGIN();
134 for (i = 0; i < ncount; i++) { 135 for (i = 0; i < ncount; i++) {
135 if (i > 0) 136 if (i > 0)
136 MF_OBSTACK_1GROW(' '); 137 MF_OBSTACK_1GROW(' ');
diff --git a/mfd/prog.c b/mfd/prog.c
index 17c2464..a2671db 100644
--- a/mfd/prog.c
+++ b/mfd/prog.c
@@ -490,7 +490,9 @@ runtime_stack_trace(eval_environ_t env)
490 prog_counter_t pc = (prog_counter_t)env->dataseg[base + 2] - 1; 490 prog_counter_t pc = (prog_counter_t)env->dataseg[base + 2] - 1;
491 char *name; 491 char *name;
492 struct locus *ploc = NULL, loc; 492 struct locus *ploc = NULL, loc;
493 493
494 if (pc < 2)
495 break; /*FIXME*/
494 if (prog[pc-2] == instr_funcall) { 496 if (prog[pc-2] == instr_funcall) {
495 name = (char*)(env->dataseg + (size_t) prog[pc-1]); 497 name = (char*)(env->dataseg + (size_t) prog[pc-1]);
496 pc -= 2; 498 pc -= 2;

Return to:

Send suggestions and report system problems to the System administrator.