From adc9e7bf221fb8de6be6f022f6ca98c4b65ed75f Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 22 Jun 2013 02:05:04 +0000 Subject: [PATCH] Fix some more bugs (coverity you're a life saver) --- ir.c | 2 +- util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ir.c b/ir.c index 3fe9908..65670c9 100644 --- a/ir.c +++ b/ir.c @@ -3910,7 +3910,7 @@ void ir_instr_dump(ir_instr *in, char *ind, return; } - strncat(ind, "\t", IND_BUFSZ); + strncat(ind, "\t", IND_BUFSZ-1); if (in->_ops[0] && (in->_ops[1] || in->_ops[2])) { ir_value_dump(in->_ops[0], oprintf); diff --git a/util.c b/util.c index 15ccd25..3cdc1db 100644 --- a/util.c +++ b/util.c @@ -440,7 +440,7 @@ static GMQCC_INLINE void mt_generate(void) { * = 2*2*3*3*11]) */ i = MT_SPACE; - while (i < MT_SIZE - 1) { + while (i < MT_SIZE-2) { /* * We expand this 11 times .. manually, no macros are required * here. This all fits in the CPU cache. -- 2.39.2