From: Christoph Mallon Date: Tue, 27 Nov 2012 22:21:19 +0000 (+0100) Subject: ia32: Prevent out-of-bounds access after calling emit_asm_operand(). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=1500e59dff75cfa53802276d5091765a238a1e71;p=libfirm ia32: Prevent out-of-bounds access after calling emit_asm_operand(). --- diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index 7fa6616f0..8a8a0e8e4 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -1009,7 +1009,8 @@ static const char* emit_asm_operand(const ir_node *node, const char *s) case 0: ir_fprintf(stderr, "Warning: asm text (%+F) ends with %%\n", node); be_emit_char('%'); - return s + 1; + return s; + case '%': be_emit_char('%'); return s + 1;