mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 03:11:28 +00:00
Add checks to "r_file_mkstemp" calls
This commit is contained in:
parent
8d24df4bd2
commit
76965f8d77
@ -17,7 +17,12 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
int len = 0;
|
||||
|
||||
ifd = r_file_mkstemp ("r_as", &ipath);
|
||||
if (ifd == -1)
|
||||
return -1;
|
||||
|
||||
ofd = r_file_mkstemp ("r_as", &opath);
|
||||
if (ofd == -1)
|
||||
return -1;
|
||||
|
||||
syntaxstr = ".intel_syntax noprefix\n"; // if intel syntax
|
||||
len = snprintf (asm_buf, sizeof (asm_buf),
|
||||
|
@ -16,7 +16,12 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
}
|
||||
|
||||
ifd = r_file_mkstemp ("r_nasm", &ipath);
|
||||
if (ifd == -1)
|
||||
return -1;
|
||||
|
||||
ofd = r_file_mkstemp ("r_nasm", &opath);
|
||||
if (ofd == -1)
|
||||
return -1;
|
||||
|
||||
len = snprintf (asm_buf, sizeof (asm_buf),
|
||||
"BITS %i\nORG 0x%"PFMT64x"\n%s", a->bits, a->pc, buf);
|
||||
|
Loading…
Reference in New Issue
Block a user