From: Dale Weiler Date: Sat, 22 Jun 2013 02:05:04 +0000 (+0000) Subject: Fix some more bugs (coverity you're a life saver) X-Git-Tag: v0.3.0~82 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=adc9e7bf221fb8de6be6f022f6ca98c4b65ed75f;p=xonotic%2Fgmqcc.git Fix some more bugs (coverity you're a life saver) --- 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.