Handle no size argument in CC command

This commit is contained in:
pancake 2011-06-08 18:15:19 +02:00
parent 1c035d4b52
commit a9a4c51132
2 changed files with 41 additions and 43 deletions

42
TODO
View File

@ -5,7 +5,12 @@
CODENAME: #DRY
* TODO: Implement r_flag_unset_i () ftw
TODO
====
* Implement r_flag_unset_i () ftw
* libmagic internal :? -- find a decent implementation and adopt it
* Ranged/scrollable zoom mode
* Honor string metadata for asmsteps ('jk' in visual)
** BUG **
* fix for indirect list manipulations -- looks like a similar problem with r_cons recusivity
@ -50,11 +55,6 @@ To wipe:
- linestyle?? for disassembly lines
- remove libr/vm and libr/db
To do:
======
* libmagic internal :? -- find a decent implementation and adopt it
* Ranged/scrollable zoom mode
* Honor string metadata for asmsteps ('jk' in visual)
pancake
-------
@ -117,7 +117,6 @@ earada
* refactor rap and raps
* remove all uses of alloca() // mingw and grep reports them all :)
* typedef all function pointers, like in r_bp
* Implement case-insensitive search (e search.casematters ?) any better name? Use /i?
* Implement /. to search using a file .. isnt zignatures about this?
* Implement /p to search for patterns
- implement it in r_core ?? or add r_io_bind support
@ -126,21 +125,16 @@ earada
0.7 release
===========
* GMP
- big-ssl.c big-gmp.c ...
- implement GMP in util/big.c
- http://etutorials.org/Programming/secure+programming/Chapter+7.+Public+Key+Cryptography/7.5+Generating+a+Prime+Number+Testing+for+Primality/
* GMP
- big-ssl.c big-gmp.c ...
- implement GMP in util/big.c
- http://etutorials.org/Programming/secure+programming/Chapter+7.+Public+Key+Cryptography/7.5+Generating+a+Prime+Number+Testing+for+Primality/
CORE
----
- Add support for DEX file format
- display filesize info instead of virtual space address limit
Assembler
---------
* Embed bits/arch/endian in a separated structure
- So one can change from one arch to another with a pointer
- Cool for defining ranges of memory
Assembler
---------
* Embed bits/arch/endian in a separated structure
- So one can change from one arch to another with a pointer
- Cool for defining ranges of memory
0.8: focus on debugger and UI
=============================
@ -149,7 +143,7 @@ earada
* Reimplement or fix the delta diffing in C - first we need to do it for ired..
* add support for .a files (r_fs supports cpio and ar archives...)
* Implement rap:// upload/download protocol commands (maybe just system() with rsc2+wget?
* code injection facilities? (wtf? insert,execute, restore)
* code injection facilities? (wtf? insert, execute, restore)
* Trace contents of buffers: filter search results..? cc 8080 @@ hit* .. check for values that has changed.
* Record trace of register status for each function when running
- r_reg_arena_copy();
@ -165,10 +159,10 @@ earada
* p7 - print 7bit encoded strings (SMS)
- variant for stego print? LSB, MSB, ...
* r_bin
- Take into account LOAD info for bin allocation
- Take into account LOAD info for bin allocation ??
* r_anal
- split r_anal API functions (too much args) _new, _add...
* gdiff
* gdiff
- graph based fingerprints? (cyclomatic complexity...)
* rcore
- do not allow to disassemble unaligned addresses (toggle)

View File

@ -3536,28 +3536,32 @@ static int cmd_meta(void *data, const char *input) {
}
break;
default: {
char *t, *p, name[128];
int n, type = input[0];
char *t, *p, name[256];
int n = 0, type = input[0];
t = strdup (input+2);
p = strchr (t, ' ');
if (p) {
*p = '\0';
strncpy (name, p+1, sizeof (name));
} else
switch (type) {
case 's':
// TODO: filter \n and so on :)
r_core_read_at (core, addr, (ut8*)name, sizeof (name));
break;
default:
{
RFlagItem *fi = r_flag_get_i (core->flags, addr);
if (fi) strncpy (name, fi->name, sizeof (name));
else sprintf (name, "ptr_%08"PFMT64x"", addr);
if (atoi (t)>0) {
p = strchr (t, ' ');
if (p) {
*p = '\0';
strncpy (name, p+1, sizeof (name));
} else switch (type) {
case 's':
// TODO: filter \n and so on :)
strncpy (name, t, sizeof (name));
r_core_read_at (core, addr, (ut8*)name, sizeof (name));
break;
default: {
RFlagItem *fi = r_flag_get_i (core->flags, addr);
if (fi) strncpy (name, fi->name, sizeof (name));
else sprintf (name, "ptr_%08"PFMT64x"", addr);
}
}
n = atoi (input+1);
} else {
p = NULL;
strncpy (name, t, sizeof (name));
}
n = atoi (input+1);
if (n==0) n = 1;
if (!n) n++;
addr_end = addr + n;
r_meta_add (core->anal->meta, type, addr, addr_end, name);
free (t);