mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-19 04:12:46 +00:00
Fix #266 - [ragg2] exit on invalid input (again)
This commit is contained in:
parent
d9724df92c
commit
d900345a66
@ -221,6 +221,8 @@ int main(int argc, char **argv) {
|
||||
case 'v':
|
||||
printf ("ragg2 "R2_VERSION" "R2_INCDIR"/sflib\n");
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,8 @@ R_API int r_hex_str2bin(const char *in, ut8 *out) {
|
||||
const char *ptr;
|
||||
ut8 c = 0, d = 0;
|
||||
|
||||
if (!in || !*in)
|
||||
return 0;
|
||||
if (!memcmp (in, "0x", 2))
|
||||
in += 2;
|
||||
for (ptr = in; ; ptr++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user