Adding a fix to commit 5b55115c42
This commit is contained in:
Google AutoFuzz Team 2018-03-22 18:18:22 -07:00 committed by GitHub
parent d158fe8d70
commit aa9885c89c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <platform.h>
#include "SystemZInstPrinter.h"
@ -295,6 +296,10 @@ static void printPCRelOperand(MCInst *MI, int OpNum, SStream *O)
if (MCOperand_isImm(MO)) {
imm = (int32_t)MCOperand_getImm(MO);
if (imm == INT_MIN) {
printf("ERROR: invalid Imm value\n");
return;
}
if (imm >= 0) {
if (imm > HEX_THRESHOLD)
SStream_concat(O, "0x%x", imm);