mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-24 14:54:54 +00:00
Fix CID 1135173
This commit is contained in:
parent
ee6a4cd5bd
commit
b55f80cd50
@ -80,16 +80,12 @@ memChunk *memString(char *string){
|
||||
void memCopy(memChunk *dest,memChunk *source){
|
||||
long nbytes;
|
||||
memCheckState();
|
||||
if(!source->address) return;
|
||||
if(!dest->address){
|
||||
dest=memString(source->address);
|
||||
}else{
|
||||
nbytes=dest->size > source->size ? source->size : dest->size;
|
||||
#if DEBUG3
|
||||
printf("Copying %d bytes to dest (size %d)\n",nbytes,dest->address,dest->size);
|
||||
#endif
|
||||
memcpy(dest->address,source->address,nbytes);
|
||||
}
|
||||
if ((!source->address) || (!dest->address)) return;
|
||||
nbytes=dest->size > source->size ? source->size : dest->size;
|
||||
#if DEBUG3
|
||||
printf("Copying %d bytes to dest (size %d)\n",nbytes,dest->address,dest->size);
|
||||
#endif
|
||||
memcpy(dest->address,source->address,nbytes);
|
||||
}
|
||||
|
||||
void memStrCat(memChunk *dest,char *string){
|
||||
|
Loading…
x
Reference in New Issue
Block a user