Skip to content

Commit

Permalink
Fix radareorg#266 - [ragg2] exit on invalid input (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Oct 28, 2013
1 parent d9724df commit d900345
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binr/ragg2/ragg2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 2 additions & 0 deletions libr/util/hex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit d900345

Please sign in to comment.