Two coverifix and a fortune

This commit is contained in:
jvoisin 2015-02-01 21:28:21 +01:00
parent 4cc887f87a
commit 7e70c4d144
3 changed files with 3 additions and 2 deletions

View File

@ -135,3 +135,4 @@ command not found: calc.exe
See you at the defcon CTF
Don't waste your time
WASTED
getdruid to get eclectic uid

View File

@ -37,7 +37,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_op_t *op, const char *buf) {
}
op->size = R_MAX (0, Assemble((char*)buf, a->pc, &asm_obj, oattempt, oconstsize, buf_err));
if (op->size > 0)
memcpy (op->buf, asm_obj.code, R_MIN(op->size, (R_ASM_BUFSIZE-1)));
memcpy (op->buf, asm_obj.code, R_MIN(R_MIN(op->size, (R_ASM_BUFSIZE-1)), MAXCMDSIZE-1));
return op->size;
}

View File

@ -499,7 +499,7 @@ static int autocomplete(RLine *line) {
break;
}
}
tmp_argv[i] = NULL;
tmp_argv[R_MIN(i, sizeof(tmp_argv)-1)] = NULL;
line->completion.argc = i;
line->completion.argv = tmp_argv;
} else {