* Fix cmdline arguments parsing segfault in radiff2

* Do not build r_big api
  - It's incomplete, not used and is problematic to build
This commit is contained in:
pancake 2011-04-17 03:54:27 +02:00
parent 6b1001aefc
commit 8069e1f509
3 changed files with 7 additions and 1 deletions

View File

@ -158,7 +158,7 @@ int main(int argc, char **argv) {
}
}
if (argc<3 || optind+2<argc)
if (argc<3 || optind+2>argc)
return show_help (R_FALSE);
file = argv[optind];

View File

@ -402,6 +402,7 @@ R_API int r_range_get_n(RRange *rgs, int n, ut64 *from, ut64 *to);
R_API RRange *r_range_inverse(RRange *rgs, ut64 from, ut64 to, int flags);
R_API int r_range_overlap(ut64 a0, ut64 a1, ut64 b0, ut64 b1, int *d);
#if 0
/* big */
#if HAVE_LIB_GMP
#define RNumBig mpz_t
@ -434,6 +435,7 @@ R_API void r_big_div(RNumBig *c, RNumBig *a, RNumBig *b);
R_API void r_big_div_ut(RNumBig *a, RNumBig *b, ut32 c);
R_API int r_big_divisible_ut(RNumBig *n, ut32 v);
R_API void r_big_mod(RNumBig *c, RNumBig *a, RNumBig *b);
#endif
R_API RHashTable* r_hashtable_new(void);

View File

@ -4,6 +4,9 @@ NAME=r_util
OBJ=mem.o pool.o num.o str.o re.o hex.o file.o alloca.o range.o log.o
OBJ+=prof.o cache.o sys.o buf.o w32-sys.o base64.o
OBJ+=list.o flist.o ht.o ht64.o mixed.o btree.o
# DO NOT BUILD r_big api (not yet used and its buggy)
ifeq (1,0)
ifeq (${HAVE_LIB_GMP},1)
OBJ+=big-gmp.o
else
@ -13,6 +16,7 @@ else
OBJ+=big.o
endif
endif
endif
LDFLAGS+=${BN_LIBS}