input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
xar_file_t xar_add_frombuffer(xar_t x, xar_file_t parent, const char *name,
char *buffer, size_t length) {
xar_file_t ret;
const __xar_file_t *i;
char idstr[40];
unsigned long v12;
v12 = __readfsqword(0x28u);
if (parent) {
ret = xar_file_new(parent);
if (!ret)
re... | xar_file_t xar_add_frombuffer(xar_t x, xar_file_t parent, const char *name,
char *buffer, size_t length) {
xar_file_t ret;
char idstr[32];
if (!parent) {
ret = xar_file_new(NULL);
if (!ret)
return NULL;
memset(idstr, 0, sizeof(idstr));
snprintf(idstr, sizeof(id... | xar_add_frombuffer | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_add_frompath(xar_t x, xar_file_t parent, const char *name,
const char *realpath) {
return xar_add_node(x, parent, name, &prefix, realpath, 1);
} | xar_file_t xar_add_frompath(xar_t x, xar_file_t parent, const char *name,
const char *realpath) {
return xar_add_node(x, parent, name, "", realpath, 1);
} | xar_add_frompath | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_add_node(xar_t x, xar_file_t f, const char *name,
const char *prefix, const char *realpath, int srcpath) {
int len1;
int len2;
char *tmp;
xar_file_t ret;
xar_file_t i;
const char *path;
char idstr[40];
unsigned long v17;
v17 = __readfsqword(0x28u);
if (f) {
... | static xar_file_t xar_add_node(xar_t x, xar_file_t f, const char *name,
const char *prefix, const char *realpath,
int srcpath) {
xar_file_t ret;
const char *path;
char *tmp;
char idstr[32];
if (!f) {
if (realpath)
asprintf(&tmp, "%s", re... | xar_add_node | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_add_pseudodir(xar_t x, xar_file_t f, const char *name,
const char *prefix, const char *realpath) {
int len1;
int len2;
char *tmp;
xar_file_t ret;
const char *path;
char idstr[40];
unsigned long v15;
v15 = __readfsqword(0x28u);
if (f) {
path = f->fspath;... | static xar_file_t xar_add_pseudodir(xar_t x, xar_file_t f, const char *name,
const char *prefix, const char *realpath) {
xar_file_t ret;
const char *path;
char *tmp;
char idstr[32];
if (!f) {
if (realpath)
asprintf(&tmp, "%s", realpath);
else
asprintf(&... | xar_add_pseudodir | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_add_r(xar_t x, xar_file_t f, const char *path,
const char *prefix) {
char *tmp2;
const char *n;
xar_file_t i;
xar_file_t ret;
xar_file_t ret2;
xar_file_t start;
char *tmp1;
char *tmp3;
unsigned long v14;
v14 = __readfsqword(0x28u);
i = 0;
start = 0;
if (pat... | static xar_file_t xar_add_r(xar_t x, xar_file_t f, const char *path,
const char *prefix) {
xar_file_t i = NULL, ret, ret2, start = NULL;
char *tmp1, *tmp2, *tmp3;
if (path && (path[0] == '\0')) {
return f;
}
tmp1 = tmp2 = strdup(path);
tmp3 = strsep(&tmp2, "/");
if (tmp3... | xar_add_r | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
unsigned int i;
int ret;
for (i = 0; i <= 7; ++i) {
if (xar_arcmods[i].archive) {
ret = xar_arcmods[i].archive(x, f, file, buffer, len);
if (ret < 0)
return ret... | int32_t xar_arcmod_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
int i;
int32_t ret;
for (i = 0; i < (sizeof(xar_arcmods) / sizeof(struct arcmod)); i++) {
if (xar_arcmods[i].archive) {
ret = xar_arcmods[i].archive(x, f, file, buffer, len);
... | xar_arcmod_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file,
char *buffer, size_t len) {
unsigned int i;
int ret;
for (i = 0; i <= 7; ++i) {
if (xar_arcmods[i].extract) {
ret = xar_arcmods[i].extract(x, f, file, buffer, len);
if (ret < 0)
return ret;
... | int32_t xar_arcmod_extract(xar_t x, xar_file_t f, const char *file,
char *buffer, size_t len) {
int i;
int32_t ret;
for (i = 0; i < (sizeof(xar_arcmods) / sizeof(struct arcmod)); i++) {
if (xar_arcmods[i].extract) {
ret = xar_arcmods[i].extract(x, f, file, buffer, len);
... | xar_arcmod_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_arcmod_verify(xar_t x, xar_file_t f, xar_progress_callback p) {
return xar_data_verify(x, f, p);
} | int32_t xar_arcmod_verify(xar_t x, xar_file_t f, xar_progress_callback p) {
return xar_data_verify(x, f, p);
} | xar_arcmod_verify | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
const char *xar_attr_first(xar_file_t f, const char *prop, xar_iter_t i) {
const __xar_attr_t *a;
xar_prop_t p;
if (prop) {
p = xar_prop_find(f->props, prop);
if (!p)
return 0;
a = p->attrs;
} else {
a = f->attrs;
}
if (!a)
return 0;
i->iter = a;
free(i->node);
i->node = str... | const char *xar_attr_first(xar_file_t f, const char *prop, xar_iter_t i) {
xar_prop_t p = NULL;
xar_attr_t a;
if (!prop)
a = XAR_FILE(f)->attrs;
else {
p = xar_prop_find(XAR_FILE(f)->props, prop);
if (!p)
return NULL;
a = XAR_PROP(p)->attrs;
}
if (!a)
return NULL;
XAR_ITER(i)-... | xar_attr_first | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_attr_free(xar_attr_t a) {
if (a) {
free((void *)a->key);
free((void *)a->value);
free((void *)a);
}
} | void xar_attr_free(xar_attr_t a) {
if (!a)
return;
free((char *)XAR_ATTR(a)->key);
free((char *)XAR_ATTR(a)->value);
free(XAR_ATTR(a));
return;
} | xar_attr_free | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
const char *xar_attr_get(xar_file_t f, const char *prop, const char *key) {
const __xar_prop_t *p;
if (!prop)
return xar_attr_pget(f, 0, key);
p = xar_prop_find(f->props, prop);
if (p)
return xar_attr_pget(f, p, key);
else
return 0;
} | const char *xar_attr_get(xar_file_t f, const char *prop, const char *key) {
if (!prop)
return xar_attr_pget(f, NULL, key);
else {
xar_prop_t p = NULL;
p = xar_prop_find(XAR_FILE(f)->props, prop);
if (!p)
return NULL;
return xar_attr_pget(f, p, key);
}
} | xar_attr_get | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_attr_t xar_attr_new() {
xar_attr_t ret;
ret = (xar_attr_t)malloc(0x20u);
if (!ret)
return 0;
ret->key = 0;
ret->value = 0;
ret->next = 0;
ret->ns = 0;
return ret;
} | xar_attr_t xar_attr_new(void) {
xar_attr_t ret;
ret = malloc(sizeof(struct __xar_attr_t));
if (!ret)
return NULL;
XAR_ATTR(ret)->key = NULL;
XAR_ATTR(ret)->value = NULL;
XAR_ATTR(ret)->next = NULL;
XAR_ATTR(ret)->ns = NULL;
return ret;
} | xar_attr_new | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
const char *xar_attr_next(xar_iter_t i) {
if (!*((_QWORD *)i->iter + 3))
return 0;
i->iter = (const void *)*((_QWORD *)i->iter + 3);
free(i->node);
i->node = strdup(*(const char **)i->iter);
return (const char *)i->node;
} | const char *xar_attr_next(xar_iter_t i) {
xar_attr_t a = XAR_ITER(i)->iter;
if (XAR_ATTR(a)->next == NULL)
return NULL;
XAR_ITER(i)->iter = XAR_ATTR(a)->next;
free(XAR_ITER(i)->node);
XAR_ITER(i)->node = strdup(XAR_ATTR(XAR_ITER(i)->iter)->key);
return XAR_ITER(i)->node;
} | xar_attr_next | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
const char *xar_attr_pget(xar_file_t f, xar_prop_t p, const char *key) {
const __xar_attr_t *a;
xar_attr_t i;
if (p)
a = p->attrs;
else
a = f->attrs;
if (!a)
return 0;
for (i = a; i && i->next; i = i->next) {
if (!strcmp(i->key, key))
return i->value;
}
if (i && !strcmp(i->key, ke... | const char *xar_attr_pget(xar_file_t f, xar_prop_t p, const char *key) {
xar_attr_t a, i;
if (!p)
a = XAR_FILE(f)->attrs;
else
a = XAR_PROP(p)->attrs;
if (!a)
return NULL;
for (i = a; i && XAR_ATTR(i)->next; i = XAR_ATTR(i)->next) {
if (strcmp(XAR_ATTR(i)->key, key) == 0) {
return XAR... | xar_attr_pget | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attr_pset(xar_file_t f, xar_prop_t p, const char *key,
const char *value) {
const __xar_attr_t *a;
__xar_attr_t *aa;
xar_attr_t i;
if (p)
a = p->attrs;
else
a = f->attrs;
if (a) {
for (i = a; i && i->next; i = i->next) {
if (!strcmp(i->key, key)) {
... | int32_t xar_attr_pset(xar_file_t f, xar_prop_t p, const char *key,
const char *value) {
xar_attr_t a, i;
if (!p) {
a = XAR_FILE(f)->attrs;
} else {
a = XAR_PROP(p)->attrs;
}
if (!a) {
a = xar_attr_new();
if (!p)
XAR_FILE(f)->attrs = a;
else
XAR_PROP(p)->a... | xar_attr_pset | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key,
const char *value) {
const __xar_prop_t *p;
if (!prop)
return xar_attr_pset(f, 0, key, value);
p = xar_prop_find(f->props, prop);
if (p)
return xar_attr_pset(f, p, key, value);
else
return -1;
} | int32_t xar_attr_set(xar_file_t f, const char *prop, const char *key,
const char *value) {
if (!prop) {
return xar_attr_pset(f, NULL, key, value);
} else {
xar_prop_t p = NULL;
p = xar_prop_find(XAR_FILE(f)->props, prop);
if (!p)
return -1;
return xar_attr_pset(f, p, k... | xar_attr_set | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, xar_prop_t p,
write_callback wcb, void *context) {
void *v5;
off_t heap_base_offset;
long v8;
void *contexta;
write_callback wcba;
xar_prop_t pa;
xar_file_t fa;
xar_t xa;
int i;
int modulecount;
int r;
int32_t r... | int32_t xar_attrcopy_from_heap(xar_t x, xar_file_t f, xar_prop_t p,
write_callback wcb, void *context) {
int modulecount = (sizeof(xar_datamods) / sizeof(struct datamod));
void *modulecontext[modulecount];
int r, i;
size_t bsize, def_bsize;
int64_t fsize, inc = 0, seekoff, reads... | xar_attrcopy_from_heap | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attrcopy_from_heap_to_heap(xar_t xsource, xar_file_t fsource,
xar_prop_t p, xar_t xdest,
xar_file_t fdest) {
int r;
int off;
char *tmpstr;
size_t bsize;
int64_t inc;
int64_t writesize;
xar_prop_t tmpp;
off_t orig_h... | int32_t xar_attrcopy_from_heap_to_heap(xar_t xsource, xar_file_t fsource,
xar_prop_t p, xar_t xdest,
xar_file_t fdest) {
int r, off;
size_t bsize;
int64_t fsize, inc = 0, seekoff, writesize = 0;
off_t orig_heap_offset = XAR(xdest)->he... | xar_attrcopy_from_heap_to_heap | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attrcopy_from_heap_to_stream(xar_stream *stream) {
int i;
int ia;
int r;
size_t bsize;
void *inbuf;
xar_stream_state_t *state;
unsigned long v8;
v8 = __readfsqword(0x28u);
state = (xar_stream_state_t *)stream->state;
if (state->pending_buf_size)
return flush_stream(stream);
bsize ... | int32_t xar_attrcopy_from_heap_to_stream(xar_stream *stream) {
xar_stream_state_t *state = stream->state;
int r, i;
size_t bsize;
void *inbuf;
if (state->pending_buf_size) {
return flush_stream(stream);
}
bsize = state->bsize;
inbuf = malloc(bsize);
if (!inbuf) {
return XAR_STREAM_ERR;
}
... | xar_attrcopy_from_heap_to_stream | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attrcopy_from_heap_to_stream_end(xar_stream *stream) {
int i;
int ret;
xar_stream_state_t *state;
state = (xar_stream_state_t *)stream->state;
for (i = 0; i < state->modulecount; ++i) {
if (xar_datamods[i].fh_done) {
ret = xar_datamods[i].fh_done(state->x, state->f, state->p,
... | int32_t xar_attrcopy_from_heap_to_stream_end(xar_stream *stream) {
xar_stream_state_t *state = (xar_stream_state_t *)stream->state;
int i;
for (i = 0; i < state->modulecount; i++) {
if (xar_datamods[i].fh_done) {
int32_t ret;
ret = xar_datamods[i].fh_done(state->x, state->f, state->p,
... | xar_attrcopy_from_heap_to_stream_end | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attrcopy_from_heap_to_stream_init(xar_t x, xar_file_t f,
xar_prop_t p,
xar_stream *stream) {
long seekoff;
xar_stream_state_t *state;
seekoff = xar_io_get_file_offset(x, f, p);
if (seekoff < 0)
return -1... | int32_t xar_attrcopy_from_heap_to_stream_init(xar_t x, xar_file_t f,
xar_prop_t p,
xar_stream *stream) {
xar_stream_state_t *state;
off_t seekoff;
seekoff = xar_io_get_file_offset(x, f, p);
if (seekoff < 0)
return X... | xar_attrcopy_from_heap_to_stream_init | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, xar_prop_t p,
read_callback rcb, void *context) {
void *v5;
int *v7;
long v8;
void *contexta;
read_callback rcba;
xar_prop_t pa;
xar_file_t fa;
xar_t xa;
int i;
int r;
int modulecount;
size_t rsize;
void *inbuf;
... | int32_t xar_attrcopy_to_heap(xar_t x, xar_file_t f, xar_prop_t p,
read_callback rcb, void *context) {
int modulecount = (sizeof(xar_datamods) / sizeof(struct datamod));
void *modulecontext[modulecount];
int r, i;
size_t bsize, rsize;
int64_t readsize = 0, writesize = 0, inc = 0, t... | xar_attrcopy_to_heap | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_bzip_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
if (!context || !*context)
return 0;
if (*(_BYTE *)*context)
BZ2_bzDecompressEnd((char *)*context + 8);
free(*context);
*context = 0;
return 0;
} | int xar_bzip_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
#ifdef HAVE_LIBBZ2
if (!context || !BZIP2_CONTEXT(context))
return 0;
if (BZIP2_CONTEXT(context)->bzipcompressed) {
BZ2_bzDecompressEnd(&BZIP2_CONTEXT(context)->bz);
}
free(BZIP2_CONTEXT(conte... | xar_bzip_fromheap_done | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_bzip_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
int r;
const char *opt;
char *out;
size_t outlen;
size_t offset;
const __xar_prop_t *tmpp;
out = 0;
offset = 0;
if (*context) {
if (!*(_BYTE *)*context)
return ... | int xar_bzip_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
const char *opt;
xar_prop_t tmpp;
#ifdef HAVE_LIBBZ2
void *out = NULL;
size_t outlen, offset = 0;
int r;
if (!BZIP2_CONTEXT(context)) {
*context = calloc(1, sizeof(struct _... | xar_bzip_fromheap_in | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_bzip_toheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
const __xar_prop_t *tmpp;
if (*(_BYTE *)*context) {
BZ2_bzCompressEnd((char *)*context + 8);
tmpp = xar_prop_pset(f, p, "encoding", 0);
if (tmpp)
xar_attr_pset(f, tmpp, "style", "application/x-bzip2");
}
free(*con... | int xar_bzip_toheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
#ifdef HAVE_LIBBZ2
xar_prop_t tmpp;
if (BZIP2_CONTEXT(context)->bzipcompressed) {
BZ2_bzCompressEnd(&BZIP2_CONTEXT(context)->bz);
tmpp = xar_prop_pset(f, p, "encoding", NULL);
if (tmpp)
xar_attr_pset(f, tmpp, "style"... | xar_bzip_toheap_done | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
int r;
unsigned int level;
int tmp;
char *out;
size_t outlen;
size_t offset;
const char *opt;
const char *opta;
out = 0;
offset = 0;
if (*context) {
if (!*(_B... | int32_t xar_bzip_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
const char *opt;
#ifdef HAVE_LIBBZ2
void *out = NULL;
size_t outlen, offset = 0;
int r;
if (!BZIP2_CONTEXT(context)) {
int level = 9;
*context = calloc(1, sizeof(stru... | xar_bzip_toheap_in | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_check_prop(xar_t x, const char *name) {
char includeset;
xar_attr_t i;
xar_attr_t ia;
includeset = 0;
for (i = x->attrs; i; i = i->next) {
if (!strcmp(i->key, "prop-include")) {
if (!strcmp(i->value, name))
return 1;
includeset = 1;
}
}
if (includeset)
return 0... | int32_t xar_check_prop(xar_t x, const char *name) {
xar_attr_t i;
char includeset = 0;
for (i = XAR(x)->attrs; i; i = XAR_ATTR(i)->next) {
if (strcmp(XAR_ATTR(i)->key, XAR_OPT_PROPINCLUDE) == 0) {
if (strcmp(XAR_ATTR(i)->value, name) == 0)
return 1;
includeset = 1;
}
}
if (includ... | xar_check_prop | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_close(xar_t x) {
int v1;
uint32_t signed_len;
int retval;
int off;
int fd;
int tocfd;
int r;
int wbytes;
int ret;
char *tmpser;
time_t t;
size_t chklen;
uint8_t *signed_data;
void *wbuf;
long rsize;
long wsize;
uint64_t ungztoc;
uint64_t gztoc;
xar_signature_t sig;
const ... | int xar_close(xar_t x) {
xar_attr_t a;
xar_file_t f;
int ret, retval = 0;
if (XAR(x)->heap_fd != -1) {
char *tmpser;
void *rbuf, *wbuf = NULL;
int fd, r, off, wbytes, rbytes;
long rsize, wsize;
z_stream zs;
uint64_t ungztoc, gztoc;
int tocfd;
char timestr[128];
struct tm tmp... | xar_close | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
_darwinattr_context context;
unsigned long v7;
v7 = __readfsqword(0x28u);
memset(&context, 0, sizeof(context));
return 0;
} | int32_t xar_darwinattr_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
struct _darwinattr_context context;
memset(&context, 0, sizeof(struct _darwinattr_context));
#if defined(__APPLE__)
if (len)
return 0;
stragglers_archive(x, f, file, (vo... | xar_darwinattr_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char *file,
char *buffer, size_t len) {
_darwinattr_context context;
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&context, 0, sizeof(context));
return underbar_extract(x, f, file, &context);
} | int32_t xar_darwinattr_extract(xar_t x, xar_file_t f, const char *file,
char *buffer, size_t len) {
struct _darwinattr_context context;
memset(&context, 0, sizeof(struct _darwinattr_context));
#if defined(__APPLE__)
if (len)
return 0;
stragglers_extract(x, f, file, (void *)&... | xar_darwinattr_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_data_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
int32_t retval;
const char *opt;
xar_prop_t tmpp;
_data_context context;
unsigned long v13;
v13 = __readfsqword(0x28u);
memset(&context, 0, sizeof(context));
if (!xar_check_prop(... | int32_t xar_data_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
const char *opt;
int32_t retval = 0;
struct _data_context context;
xar_prop_t tmpp;
memset(&context, 0, sizeof(struct _data_context));
if (!xar_check_prop(x, "data"))
return 0;
... | xar_data_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_data_extract(xar_t x, xar_file_t f, const char *file, char *buffer,
size_t len) {
int32_t retval;
const char *opt;
xar_prop_t tmpp;
_data_context context;
unsigned long v13;
v13 = __readfsqword(0x28u);
memset(&context, 0, sizeof(context));
xar_prop_get(f, "type", &o... | int32_t xar_data_extract(xar_t x, xar_file_t f, const char *file, char *buffer,
size_t len) {
const char *opt;
int32_t retval = 0;
struct _data_context context;
xar_prop_t tmpp;
memset(&context, 0, sizeof(struct _data_context));
xar_prop_get(f, "type", &opt);
if (!opt)
retur... | xar_data_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_data_read(xar_t x, xar_file_t f, void *inbuf, size_t bsize,
void *context) {
int r;
size_t sizetoread;
if (*((_QWORD *)context + 3)) {
sizetoread = *((_QWORD *)context + 3) - *((_QWORD *)context + 4);
if (sizetoread) {
if (sizetoread > bsize)
sizetoread = b... | int32_t xar_data_read(xar_t x, xar_file_t f, void *inbuf, size_t bsize,
void *context) {
int32_t r;
if (DATA_CONTEXT(context)->length) {
char *readbuf = (char *)DATA_CONTEXT(context)->buffer;
size_t sizetoread =
DATA_CONTEXT(context)->length - DATA_CONTEXT(context)->offset;
... | xar_data_read | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_data_verify(xar_t x, xar_file_t f, xar_progress_callback p) {
const char *opt;
xar_prop_t tmpp;
_data_context context;
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&context, 0, sizeof(context));
context.progress = p;
xar_prop_get(f, "type", &opt);
if (!opt)
return 0;
if (!str... | int32_t xar_data_verify(xar_t x, xar_file_t f, xar_progress_callback p) {
const char *opt;
struct _data_context context;
xar_prop_t tmpp;
memset(&context, 0, sizeof(struct _data_context));
context.progress = p;
xar_prop_get(f, "type", &opt);
if (!opt)
return 0;
if (strcmp(opt, "directory") == 0) ... | xar_data_verify | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_data_write(xar_t x, xar_file_t f, void *buf, size_t len,
void *context) {
int r;
size_t off;
off = 0;
if (*((_QWORD *)context + 3)) {
if (len + *((_QWORD *)context + 4) <= *((_QWORD *)context + 3)) {
memcpy((void *)(*((_QWORD *)context + 4) + *((_QWORD *)context + 2... | int32_t xar_data_write(xar_t x, xar_file_t f, void *buf, size_t len,
void *context) {
int32_t r;
size_t off = 0;
if (DATA_CONTEXT(context)->length) {
char *writebuf = (char *)DATA_CONTEXT(context)->buffer;
if ((DATA_CONTEXT(context)->offset + len) > DATA_CONTEXT(context)->length) ... | xar_data_write | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_devmake(dev_t dev, uint32_t *out_major, uint32_t *out_minor) {
*out_major = BYTE1(dev);
*out_minor = (unsigned char)dev;
} | void xar_devmake(dev_t dev, uint32_t *out_major, uint32_t *out_minor) {
#ifdef major
*out_major = major(dev);
#else
*out_major = (dev >> 8) & 0xFF;
#endif
#ifdef minor
*out_minor = minor(dev);
#else
*out_minor = dev & 0xFF;
#endif
return;
} | xar_devmake | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_prop_t xar_ea_find(xar_file_t f, const char *name) {
const __xar_prop_t *p;
const char *tmp;
const char *tmpa;
const __xar_prop_t *tmpp;
for (p = xar_prop_pfirst(f); p; p = xar_prop_pnext(p)) {
tmp = xar_prop_getkey(p);
if (!strncmp(tmp, "ea", 2u) && strlen(tmp) == 2) {
tmpp = xar_prop_pget... | xar_prop_t xar_ea_find(xar_file_t f, const char *name) {
xar_prop_t p;
for (p = xar_prop_pfirst(f); p; p = xar_prop_pnext(p)) {
const char *tmp;
xar_prop_t tmpp;
tmp = xar_prop_getkey(p);
if (strncmp(tmp, XAR_EA_FORK, strlen(XAR_EA_FORK)) != 0)
continue;
if (strlen(tmp) != strlen(XAR_EA_... | xar_ea_find | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_ea_t xar_ea_new(xar_file_t f, const char *name) {
xar_prop_t prop;
__xar_attr_t *attrs;
uint64_t nexteaid;
xar_ea_t ret;
ret = (xar_ea_t)calloc(0x10u, 1u);
if (!ret)
return 0;
ret->prop = xar_prop_new(f, 0);
if (ret->prop) {
xar_prop_setkey(ret->prop, "ea");
xar_prop_setvalue(ret->prop,... | xar_ea_t xar_ea_new(xar_file_t f, const char *name) {
xar_ea_t ret;
ret = calloc(sizeof(struct __xar_ea_t), 1);
if (!ret)
return NULL;
XAR_EA(ret)->prop = xar_prop_new(f, NULL);
if (!XAR_EA(ret)->prop) {
free(ret);
return NULL;
}
xar_prop_setkey(XAR_EA(ret)->prop, "ea");
xar_prop_setvalue... | xar_ea_new | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_ea_pget(xar_ea_t e, const char *key, const char **value) {
xar_prop_t r;
r = xar_prop_find(e->prop, key);
if (r) {
if (value)
*value = r->value;
return 0;
} else {
if (value)
*value = 0;
return -1;
}
} | int32_t xar_ea_pget(xar_ea_t e, const char *key, const char **value) {
xar_prop_t r = xar_prop_find(XAR_EA(e)->prop, key);
if (!r) {
if (value)
*value = NULL;
return -1;
}
if (value)
*value = XAR_PROP(r)->value;
return 0;
} | xar_ea_pget | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_ea_pset(xar_file_t f, xar_ea_t e, const char *key,
const char *value) {
if (xar_prop_pset(f, e->prop, key, value))
return 0;
else
return -1;
} | int32_t xar_ea_pset(xar_file_t f, xar_ea_t e, const char *key,
const char *value) {
if (xar_prop_pset(f, XAR_EA(e)->prop, key, value))
return 0;
return -1;
} | xar_ea_pset | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_prop_t xar_ea_root(xar_ea_t e) { return e->prop; } | xar_prop_t xar_ea_root(xar_ea_t e) { return XAR_EA(e)->prop; } | xar_ea_root | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err) {
if (x->ercallback)
return x->ercallback(sev, err, &x->errctx, x->errctx.usrctx);
else
return 0;
} | int32_t xar_err_callback(xar_t x, int32_t sev, int32_t err) {
if (XAR(x)->ercallback)
return XAR(x)->ercallback(sev, err, &XAR(x)->errctx,
ECTX(&XAR(x)->errctx)->usrctx);
return 0;
} | xar_err_callback | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_t xar_err_get_archive(xar_errctx_t ctx) {
return (xar_t) * ((_QWORD *)ctx + 4);
} | xar_t xar_err_get_archive(xar_errctx_t ctx) { return ECTX(ctx)->x; } | xar_err_get_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_err_get_errno(xar_errctx_t ctx) { return *((_DWORD *)ctx + 2); } | int xar_err_get_errno(xar_errctx_t ctx) { return ECTX(ctx)->saved_errno; } | xar_err_get_errno | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_err_get_file(xar_errctx_t ctx) {
return (xar_file_t) * ((_QWORD *)ctx + 2);
} | xar_file_t xar_err_get_file(xar_errctx_t ctx) { return ECTX(ctx)->file; } | xar_err_get_file | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
const char *xar_err_get_string(xar_errctx_t ctx) { return *(const char **)ctx; } | const char *xar_err_get_string(xar_errctx_t ctx) { return ECTX(ctx)->str; } | xar_err_get_string | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_err_new(xar_t x) {
memset(&x->errctx, 0, sizeof(x->errctx));
x->errctx.saved_errno = *__errno_location();
} | void xar_err_new(xar_t x) {
memset(&XAR(x)->errctx, 0, sizeof(struct errctx));
XAR(x)->errctx.saved_errno = errno;
return;
} | xar_err_new | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_err_set_errno(xar_t x, int e) { x->errctx.saved_errno = e; } | void xar_err_set_errno(xar_t x, int e) {
XAR(x)->errctx.saved_errno = e;
return;
} | xar_err_set_errno | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_err_set_file(xar_t x, xar_file_t f) { x->errctx.file = f; } | void xar_err_set_file(xar_t x, xar_file_t f) {
XAR(x)->errctx.file = f;
return;
} | xar_err_set_file | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_err_set_formatted_string(xar_t x, const char *format, ...) {
long v2;
long v3;
long v4;
long v5;
char *msg;
va_list arg;
unsigned long v8;
long v9;
long v10;
long v11;
long v12;
va_start(arg, format);
v2 = va_arg(arg, _QWORD);
v3 = va_arg(arg, _QWORD);
v4 = va_arg(arg, _QWORD);
... | void xar_err_set_formatted_string(xar_t x, const char *format, ...) {
va_list arg;
char *msg;
va_start(arg, format);
vasprintf(&msg, format, arg);
va_end(arg);
xar_err_set_string(x, msg);
free(msg);
} | xar_err_set_formatted_string | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_err_set_string(xar_t x, const char *str) {
x->errctx.str = strdup(str);
} | void xar_err_set_string(xar_t x, const char *str) {
XAR(x)->errctx.str = strdup(str);
return;
} | xar_err_set_string | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_ext2attr_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
int v6;
int v7;
int v8;
int v9;
int v10;
int v11;
int v12;
int v13;
int v14;
int flags;
int version;
int ret;
int fd;
char *vstr;
const char *opt[2];
opt[1] = (co... | int xar_ext2attr_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
int ret = 0;
if (len)
return 0;
#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
int fd, flags = 0, version;
char *vstr;
const char *opt;
xar_prop_get(f, "ty... | xar_ext2attr_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_ext2attr_extract(xar_t x, xar_file_t f, const char *file, char *buffer,
size_t len) {
int v6;
int v7;
int v8;
int v9;
int v10;
int v11;
int v12;
int v13;
int v14;
int version;
int flags;
int fd;
char *tmp;
const char *temp;
unsigned long v21;
v21 = __rea... | int xar_ext2attr_extract(xar_t x, xar_file_t f, const char *file, char *buffer,
size_t len) {
if (len)
return 0;
#if defined(HAVE_EXT2FS_EXT2_FS_H) || defined(HAVE_LINUX_EXT2_FS_H)
int fd = -1, version, flags = 0;
char *tmp;
if (xar_prop_get(f, XAR_EXT2_FORK, NULL) == 0) {
co... | xar_ext2attr_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract(xar_t x, xar_file_t f) {
char *tmp1;
char *dname;
const __xar_file_t *tmpf;
stat sb;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (strchr(f->fspath, 47) && stat64(f->fspath, (struct stat64 *)&sb) &&
!f->parent_extracted) {
tmp1 = strdup(f->fspath);
dname = xar_safe_di... | int32_t xar_extract(xar_t x, xar_file_t f) {
struct stat sb;
char *tmp1, *dname;
xar_file_t tmpf;
if ((strstr(XAR_FILE(f)->fspath, "/") != NULL) &&
(stat(XAR_FILE(f)->fspath, &sb)) &&
(XAR_FILE(f)->parent_extracted == 0)) {
tmp1 = strdup(XAR_FILE(f)->fspath);
dname = xar_safe_dirname(tmp1);... | xar_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract_tobuffer(xar_t x, xar_file_t f, char **buffer) {
size_t size[2];
size[1] = __readfsqword(0x28u);
return xar_extract_tobuffersz(x, f, buffer, size);
} | int32_t xar_extract_tobuffer(xar_t x, xar_file_t f, char **buffer) {
size_t size;
return xar_extract_tobuffersz(x, f, buffer, &size);
} | xar_extract_tobuffer | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract_tobuffersz(xar_t x, xar_file_t f, char **buffer,
size_t *size) {
int32_t ret;
const char *sizestring[2];
sizestring[1] = (const char *)__readfsqword(0x28u);
sizestring[0] = 0;
if (xar_prop_get(f, "data/size", sizestring)) {
if (xar_prop_get(f, "type", si... | int32_t xar_extract_tobuffersz(xar_t x, xar_file_t f, char **buffer,
size_t *size) {
const char *sizestring = NULL;
int32_t ret;
if (0 != xar_prop_get(f, "data/size", &sizestring)) {
if (0 != xar_prop_get(f, "type", &sizestring))
return -1;
if (strcmp(sizestring, "fil... | xar_extract_tobuffersz | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract_tofile(xar_t x, xar_file_t f, const char *path) {
return xar_arcmod_extract(x, f, path, 0, 0);
} | int32_t xar_extract_tofile(xar_t x, xar_file_t f, const char *path) {
return xar_arcmod_extract(x, f, path, NULL, 0);
} | xar_extract_tofile | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract_tostream(xar_stream *stream) {
return xar_attrcopy_from_heap_to_stream(stream);
} | int32_t xar_extract_tostream(xar_stream *stream) {
return xar_attrcopy_from_heap_to_stream(stream);
} | xar_extract_tostream | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract_tostream_end(xar_stream *stream) {
return xar_attrcopy_from_heap_to_stream_end(stream);
} | int32_t xar_extract_tostream_end(xar_stream *stream) {
return xar_attrcopy_from_heap_to_stream_end(stream);
} | xar_extract_tostream_end | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_extract_tostream_init(xar_t x, xar_file_t f, xar_stream *stream) {
const __xar_prop_t *tmpp;
if (!xar_check_prop(x, "data"))
return 0;
tmpp = xar_prop_pfirst(f);
if (tmpp)
tmpp = xar_prop_find(tmpp, "data");
if (tmpp)
return xar_attrcopy_from_heap_to_stream_init(x, f, tmpp, stream);
... | int32_t xar_extract_tostream_init(xar_t x, xar_file_t f, xar_stream *stream) {
xar_prop_t tmpp;
if (!xar_check_prop(x, "data"))
return XAR_STREAM_OK;
tmpp = xar_prop_pfirst(f);
if (tmpp)
tmpp = xar_prop_find(tmpp, "data");
if (!tmpp)
return XAR_STREAM_OK;
return xar_attrcopy_from_heap_to_stre... | xar_extract_tostream_init | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
return 0;
} | int32_t xar_fbsdattr_archive(xar_t x, xar_file_t f, const char *file,
const char *buffer, size_t len) {
#ifdef HAVE_SYS_EXTATTR_H
char *buf = NULL;
int ret, retval = 0, bufsz, i;
#if defined(HAVE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME)
struct statvfs sfs;
#else
struct ... | xar_fbsdattr_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char *file,
char *buffer, size_t len) {
return 0;
} | int32_t xar_fbsdattr_extract(xar_t x, xar_file_t f, const char *file,
char *buffer, size_t len) {
#ifdef HAVE_SYS_EXTATTR_H
char *fsname = "bogus";
xar_prop_t p;
#if defined(HAVE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME)
struct statvfs sfs;
#else
struct statfs sfs;
#endi... | xar_fbsdattr_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_file_find(xar_file_t f, const char *path) {
char *tmp2;
const char *name;
xar_file_t i;
char *tmp1;
char *tmp3;
xar_file_t ret;
unsigned long v9;
v9 = __readfsqword(0x28u);
if (!f)
return 0;
tmp1 = strdup(path);
tmp2 = tmp1;
tmp3 = strsep(&tmp2, "/");
i = f;
while (1) {
... | xar_file_t xar_file_find(xar_file_t f, const char *path) {
xar_file_t i, ret;
char *tmp1, *tmp2, *tmp3;
if (!f)
return NULL;
tmp2 = tmp1 = strdup(path);
tmp3 = strsep(&tmp2, "/");
i = f;
do {
const char *name;
xar_prop_get(i, "name", &name);
if (name == NULL)
continue;
if (strcm... | xar_file_find | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_file_first(xar_t x, xar_iter_t i) {
i->iter = x->files;
free(i->node);
return (xar_file_t)i->iter;
} | xar_file_t xar_file_first(xar_t x, xar_iter_t i) {
XAR_ITER(i)->iter = XAR(x)->files;
free(XAR_ITER(i)->node);
return XAR_ITER(i)->iter;
} | xar_file_first | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_file_free(xar_file_t f) {
const __xar_attr_t *a;
xar_prop_t n;
const __xar_file_t *i;
while (f->children) {
i = f->children;
f->children = i->next;
xar_file_free(i);
}
while (f->props) {
n = f->props;
f->props = f->props->next;
xar_prop_free(n);
}
while (f->attrs) {
... | void xar_file_free(xar_file_t f) {
xar_file_t i;
xar_prop_t n;
xar_attr_t a;
while (XAR_FILE(f)->children) {
i = XAR_FILE(f)->children;
XAR_FILE(f)->children = XAR_FILE(i)->next;
xar_file_free(i);
}
while (XAR_FILE(f)->props) {
n = XAR_FILE(f)->props;
XAR_FILE(f)->props = XAR_PROP(n)->ne... | xar_file_free | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_file_new(xar_file_t f) {
const __xar_file_t *i;
xar_file_t ret;
ret = (xar_file_t)calloc(1u, 0x58u);
if (!ret)
return 0;
ret->parent = f;
ret->next = 0;
ret->children = 0;
ret->props = 0;
ret->attrs = 0;
ret->prefix = 0;
ret->ns = 0;
ret->fspath = 0;
ret->eas = 0;
ret->ne... | xar_file_t xar_file_new(xar_file_t f) {
xar_file_t ret, i;
ret = calloc(1, sizeof(struct __xar_file_t));
if (!ret)
return NULL;
XAR_FILE(ret)->parent = f;
XAR_FILE(ret)->next = NULL;
XAR_FILE(ret)->children = NULL;
XAR_FILE(ret)->props = NULL;
XAR_FILE(ret)->attrs = NULL;
XAR_FILE(ret)->prefix =... | xar_file_new | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_file_next(xar_iter_t i) {
const char *name;
xar_file_t f;
char *tmp;
char *tmp2;
char *tmp1;
unsigned long v7;
v7 = __readfsqword(0x28u);
f = (xar_file_t)i->iter;
if (!i->nochild && f->children) {
tmp = i->path;
xar_prop_get(f, "name", &name);
if (tmp) {
asprintf(&i->... | xar_file_t xar_file_next(xar_iter_t i) {
xar_file_t f = XAR_ITER(i)->iter;
const char *name;
if (!(XAR_ITER(i)->nochild) && XAR_FILE(f)->children) {
char *tmp = XAR_ITER(i)->path;
xar_prop_get(f, "name", &name);
if (tmp) {
asprintf(&XAR_ITER(i)->path, "%s/%s", tmp, name);
free(tmp);
} ... | xar_file_next | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_file_replicate(xar_file_t original, xar_file_t newparent) {
const __xar_attr_t *a;
const __xar_file_t *ret;
ret = xar_file_new(newparent);
for (a = original->attrs; a; a = a->next) {
if (strcmp(a->key, "id"))
xar_attr_set(ret, 0, a->key, a->value);
}
xar_prop_replicate_r(ret, origi... | xar_file_t xar_file_replicate(xar_file_t original, xar_file_t newparent) {
xar_file_t ret = xar_file_new(newparent);
xar_attr_t a;
for (a = XAR_FILE(original)->attrs; a; a = XAR_ATTR(a)->next) {
if (0 == strcmp(a->key, "id"))
continue;
xar_attr_set(ret, NULL, a->key, a->value);
}
xar_prop_re... | xar_file_replicate | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer) {
const __xar_attr_t *a;
do {
xmlTextWriterStartElement(writer, "file");
for (a = f->attrs; a; a = a->next)
xmlTextWriterWriteAttribute(writer, a->key, a->value);
xar_prop_serialize(f->props, writer);
if (f->children)
xar_fi... | void xar_file_serialize(xar_file_t f, xmlTextWriterPtr writer) {
xar_file_t i;
xar_attr_t a;
i = f;
do {
xmlTextWriterStartElement(writer, BAD_CAST("file"));
for (a = XAR_FILE(i)->attrs; a; a = XAR_ATTR(a)->next) {
xmlTextWriterWriteAttribute(writer, BAD_CAST(XAR_ATTR(a)->key),
... | xar_file_serialize | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent,
xmlTextReaderPtr reader) {
int i;
int type;
const char *opt;
xar_file_t ret;
const char *name_0;
const char *value;
xar_attr_t a;
const char *name;
unsigned long v13;
v13 = __readfsqword(0x28u);
ret = xar_... | xar_file_t xar_file_unserialize(xar_t x, xar_file_t parent,
xmlTextReaderPtr reader) {
xar_file_t ret;
const char *name;
int type, i;
ret = xar_file_new(parent);
i = xmlTextReaderAttributeCount(reader);
if (i > 0) {
for (i = xmlTextReaderMoveToFirstAttribute(reader); i ... | xar_file_unserialize | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_flags_extract(xar_t x, xar_file_t f, const char *file, char *buffer,
size_t len) {
return 0;
} | int32_t xar_flags_extract(xar_t x, xar_file_t f, const char *file, char *buffer,
size_t len) {
#ifdef HAVE_CHFLAGS
char *tmp;
u_int flags = 0;
if (xar_prop_get(f, XAR_FLAG_FORK, NULL))
return 0;
#ifdef UF_NODUMP
if (x_getprop(f, "UserNoDump", (char **)&tmp) == 0)
flags |= UF_... | xar_flags_extract | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
unsigned char *xar_from_base64(const unsigned char *input, size_t inputLength,
size_t *outputLength) {
unsigned char *output;
output = (unsigned char *)malloc(3 * ((inputLength >> 2) + 1));
if (!output)
return 0;
if (!raw_base64_decode(input, output, inputLength, outputLength... | unsigned char *xar_from_base64(const unsigned char *input, size_t inputLength,
size_t *outputLength) {
int err;
unsigned char *output;
output = malloc(3 * (inputLength / 4 + 1));
if (output == NULL)
return NULL;
err = raw_base64_decode(input, output, inputLength, outputLen... | xar_from_base64 | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_group(xar_t x, xar_file_t f) {
const char *group[2];
group[1] = (const char *)__readfsqword(0x28u);
group[0] = 0;
xar_prop_get(f, "group", group);
if (group[0])
return strdup(group[0]);
else
return strdup("unknown");
} | char *xar_get_group(xar_t x, xar_file_t f) {
const char *group = NULL;
xar_prop_get(f, "group", &group);
if (!group)
return strdup("unknown");
return strdup(group);
} | xar_get_group | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
off_t_0 xar_get_heap_offset(xar_t x) { return x->toc_count + 28; } | off_t xar_get_heap_offset(xar_t x) {
return XAR(x)->toc_count + sizeof(xar_header_t);
} | xar_get_heap_offset | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_mode(xar_t x, xar_file_t f) {
mode_t m;
const char *mode;
const char *type;
char *ret;
unsigned long v7;
v7 = __readfsqword(0x28u);
mode = 0;
type = 0;
xar_prop_get(f, "mode", &mode);
if (!mode)
return strdup("??????????");
*__errno_location() = 0;
m = strtoll(mode, 0, 8);
i... | char *xar_get_mode(xar_t x, xar_file_t f) {
const char *mode = NULL;
const char *type = NULL;
char *ret;
mode_t m;
xar_prop_get(f, "mode", &mode);
if (mode == NULL)
return strdup("??????????");
errno = 0;
m = strtoll(mode, 0, 8);
if (errno)
return strdup("??????????");
xar_prop_get(f, "type... | xar_get_mode | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_mtime(xar_t x, xar_file_t f) {
const char *mtime;
char *tmp;
tm tm;
unsigned long v6;
v6 = __readfsqword(0x28u);
mtime = 0;
xar_prop_get(f, "mtime", &mtime);
if (!mtime)
mtime = "1970-01-01T00:00:00Z";
strptime(mtime, "%FT%T", &tm);
tmp = (char *)calloc(0x80u, 1u);
strftime(tmp,... | char *xar_get_mtime(xar_t x, xar_file_t f) {
const char *mtime = NULL;
char *tmp;
struct tm tm;
xar_prop_get(f, "mtime", &mtime);
if (!mtime)
mtime = "1970-01-01T00:00:00Z";
strptime(mtime, "%FT%T", &tm);
tmp = calloc(128, 1);
strftime(tmp, 127, "%F %T", &tm);
return tmp;
} | xar_get_mtime | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_owner(xar_t x, xar_file_t f) {
const char *user[2];
user[1] = (const char *)__readfsqword(0x28u);
user[0] = 0;
xar_prop_get(f, "user", user);
if (user[0])
return strdup(user[0]);
else
return strdup("unknown");
} | char *xar_get_owner(xar_t x, xar_file_t f) {
const char *user = NULL;
xar_prop_get(f, "user", &user);
if (!user)
return strdup("unknown");
return strdup(user);
} | xar_get_owner | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_path(xar_file_t f) {
char *ret;
const char *name;
const char *name_0;
xar_file_t i;
char *tmp;
unsigned long v7;
v7 = __readfsqword(0x28u);
xar_prop_get(f, "name", &name);
if (!name)
return 0;
ret = strdup(name);
for (i = f->parent; i; i = i->parent) {
xar_prop_get(i, "name"... | char *xar_get_path(xar_file_t f) {
char *ret, *tmp;
const char *name;
xar_file_t i;
xar_prop_get(f, "name", &name);
if (name == NULL) {
return NULL;
}
ret = strdup(name);
for (i = XAR_FILE(f)->parent; i; i = XAR_FILE(i)->parent) {
const char *name;
xar_prop_get(i, "name", &name);
tmp =... | xar_get_path | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_size(xar_t x, xar_file_t f) {
const __xar_file_t *fa;
const char *size;
const char *type;
xar_file_t tmpf;
const char *link;
xar_iter_t i;
const char *id;
unsigned long v10;
fa = f;
v10 = __readfsqword(0x28u);
size = 0;
type = 0;
xar_prop_get(f, "type", &type);
if (type) {
... | char *xar_get_size(xar_t x, xar_file_t f) {
const char *size = NULL;
const char *type = NULL;
xar_prop_get(f, "type", &type);
if (type != NULL) {
if (strcmp(type, "hardlink") == 0) {
const char *link = NULL;
link = xar_attr_get(f, "type", "link");
if (link) {
if (strcmp(link, "ori... | xar_get_size | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
char *xar_get_type(xar_t x, xar_file_t f) {
const char *type[2];
type[1] = (const char *)__readfsqword(0x28u);
type[0] = 0;
xar_prop_get(f, "type", type);
if (!type[0])
type[0] = "unknown";
return strdup(type[0]);
} | char *xar_get_type(xar_t x, xar_file_t f) {
const char *type = NULL;
xar_prop_get(f, "type", &type);
if (type == NULL)
type = "unknown";
return strdup(type);
} | xar_get_type | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_gzip_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
if (!context || !*context)
return 0;
if (*(_BYTE *)*context)
inflateEnd((char *)*context + 16);
free(*context);
*context = 0;
return 0;
} | int xar_gzip_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
if (!context || !GZIP_CONTEXT(context))
return 0;
if (GZIP_CONTEXT(context)->gzipcompressed) {
inflateEnd(&GZIP_CONTEXT(context)->z);
}
free(GZIP_CONTEXT(context));
*context = NULL;
retur... | xar_gzip_fromheap_done | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_gzip_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
unsigned int r;
const char *opt;
char *out;
size_t outlen;
size_t offset;
const __xar_prop_t *tmpp;
out = 0;
offset = 0;
if (*context) {
if (!*(_BYTE *)*context)
... | int xar_gzip_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
const char *opt;
void *out = NULL;
size_t outlen, offset = 0;
int r;
xar_prop_t tmpp;
if (!GZIP_CONTEXT(context)) {
*context = calloc(1, sizeof(struct _gzip_context));
... | xar_gzip_fromheap_in | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int xar_gzip_toheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
const __xar_prop_t *tmpp;
if (*(_BYTE *)*context) {
deflateEnd((char *)*context + 16);
if (*((_QWORD *)*context + 1)) {
tmpp = xar_prop_pset(f, p, "encoding", 0);
if (tmpp)
xar_attr_pset(f, tmpp, "style", "a... | int xar_gzip_toheap_done(xar_t x, xar_file_t f, xar_prop_t p, void **context) {
xar_prop_t tmpp;
if (GZIP_CONTEXT(context)->gzipcompressed) {
deflateEnd(&GZIP_CONTEXT(context)->z);
if (GZIP_CONTEXT(context)->count) {
tmpp = xar_prop_pset(f, p, "encoding", NULL);
if (tmpp)
xar_attr_pset... | xar_gzip_toheap_done | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
unsigned int r;
unsigned int level;
int tmp;
char *out;
size_t outlen;
size_t offset;
const char *opt;
const char *opta;
out = 0;
offset = 0;
if (*context) {
... | int32_t xar_gzip_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
void *out = NULL;
size_t outlen, offset = 0;
int r;
const char *opt;
if (!GZIP_CONTEXT(context)) {
int level = Z_BEST_COMPRESSION;
*context = calloc(1, sizeof(struct ... | xar_gzip_toheap_in | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void *xar_hash_finish(xar_hash_t hash, size_t *nbyte) {
void *buffer;
buffer = calloc(1u, 0x40u);
if (!buffer)
return 0;
EVP_DigestFinal(hash->digest, buffer, &hash->length);
EVP_MD_CTX_free(hash->digest);
*nbyte = hash->length;
free((void *)hash->digest_name);
free(hash);
return buffer;
} | void *xar_hash_finish(xar_hash_t hash, size_t *nbyte) {
#ifdef __APPLE__
void *buffer = calloc(1, CC_SHA512_DIGEST_LENGTH);
#else
void *buffer = calloc(1, EVP_MAX_MD_SIZE);
#endif
if (!buffer)
return NULL;
#ifdef __APPLE__
CCDigestFinal(HASH_CTX(hash)->digest, buffer);
CCDigestDestroy(HASH_CTX(hash)->dig... | xar_hash_finish | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_hash_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
const char *digest_name;
int32_t result;
_BOOL4 hash_match;
_BOOL4 style_match;
size_t length;
const char *archived_hash;
const char *archived_style;
xar_prop_t tmpp;
const char *calcul... | int32_t xar_hash_fromheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
if (!CONTEXT(context))
return 0;
int32_t result = 0;
const char *archived_hash = NULL, *archived_style = NULL;
if (CONTEXT(context)->archived) {
xar_prop_t tmpp = xar_prop_pget(p, "arch... | xar_hash_fromheap_done | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_hash_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
return xar_hash_toheap_out(x, f, p, *in, *inlen, context);
} | int32_t xar_hash_fromheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
return xar_hash_toheap_out(x, f, p, *in, *inlen, context);
} | xar_hash_fromheap_in | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_hash_fromheap_out(xar_t x, xar_file_t f, xar_prop_t p, void *in,
size_t inlen, void **context) {
_QWORD *v7;
const char *opt;
const __xar_prop_t *tmpp;
opt = 0;
tmpp = xar_prop_pget(p, "extracted-checksum");
if (tmpp || (tmpp = xar_prop_pget(p, "unarchived-checksum... | int32_t xar_hash_fromheap_out(xar_t x, xar_file_t f, xar_prop_t p, void *in,
size_t inlen, void **context) {
const char *opt;
xar_prop_t tmpp;
opt = NULL;
tmpp = xar_prop_pget(p, "extracted-checksum");
if (tmpp) {
opt = xar_attr_pget(f, tmpp, "style");
} else {
tmpp =... | xar_hash_fromheap_out | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void *xar_hash_get_context(xar_hash_t hash) { return hash->context; } | void *xar_hash_get_context(xar_hash_t hash) { return HASH_CTX(hash)->context; } | xar_hash_get_context | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
const char *xar_hash_get_digest_name(xar_hash_t hash) {
return hash->digest_name;
} | const char *xar_hash_get_digest_name(xar_hash_t hash) {
return HASH_CTX(hash)->digest_name;
} | xar_hash_get_digest_name | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
xar_hash_t xar_hash_new(const char *digest_name, void *context) {
__xar_hash_t *hash;
hash = (__xar_hash_t *)calloc(1u, 0x28u);
if (!hash)
return 0;
if (context)
hash->context = context;
OPENSSL_init_crypto(8, 0);
hash->type = (const EVP_MD *)EVP_get_digestbyname(digest_name);
hash->digest = (EVP... | xar_hash_t xar_hash_new(const char *digest_name, void *context) {
struct __xar_hash_t *hash = calloc(1, sizeof(struct __xar_hash_t));
if (!hash)
return NULL;
if (context)
HASH_CTX(hash)->context = context;
#ifdef __APPLE__
HASH_CTX(hash)->digest =
digestRef_from_name(digest_name, &HASH_CTX(hash)... | xar_hash_new | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_hash_toheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
const char *digest_name;
const char *v6;
size_t archived_length;
size_t unarchived_length;
const char *archived_style;
const char *unarchived_style;
void *archived_hash;
void *unarchived_hash... | int32_t xar_hash_toheap_done(xar_t x, xar_file_t f, xar_prop_t p,
void **context) {
const char *archived_style = NULL, *unarchived_style = NULL;
size_t archived_length = -1, unarchived_length = -1;
void *archived_hash = NULL, *unarchived_hash = NULL;
if (!CONTEXT(context))
retu... | xar_hash_toheap_done | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_hash_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
return xar_hash_fromheap_out(x, f, p, *in, *inlen, context);
} | int32_t xar_hash_toheap_in(xar_t x, xar_file_t f, xar_prop_t p, void **in,
size_t *inlen, void **context) {
return xar_hash_fromheap_out(x, f, p, *in, *inlen, context);
} | xar_hash_toheap_in | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_hash_toheap_out(xar_t x, xar_file_t f, xar_prop_t p, void *in,
size_t inlen, void **context) {
_QWORD *v7;
const char *opt;
const __xar_prop_t *tmpp;
opt = 0;
tmpp = xar_prop_pget(p, "archived-checksum");
if (tmpp)
opt = xar_attr_pget(f, tmpp, "style");
if (!op... | int32_t xar_hash_toheap_out(xar_t x, xar_file_t f, xar_prop_t p, void *in,
size_t inlen, void **context) {
const char *opt;
xar_prop_t tmpp;
opt = NULL;
tmpp = xar_prop_pget(p, "archived-checksum");
if (tmpp)
opt = xar_attr_pget(f, tmpp, "style");
if (!opt)
opt = xar_op... | xar_hash_toheap_out | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
void xar_hash_update(xar_hash_t hash, void *buffer, size_t nbyte) {
EVP_DigestUpdate(hash->digest, buffer, nbyte);
} | void xar_hash_update(xar_hash_t hash, void *buffer, size_t nbyte) {
#ifdef __APPLE__
CCDigestUpdate(HASH_CTX(hash)->digest, buffer, nbyte);
#else
EVP_DigestUpdate(&HASH_CTX(hash)->digest, buffer, nbyte);
#endif
} | xar_hash_update | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int32_t xar_heap_to_archive(xar_t x) {
int off;
signed long bsize;
const char *opt;
char *b;
long r;
long ra;
opt = xar_opt_get(x, "rsize");
if (opt) {
bsize = strtol(opt, 0, 0);
if ((bsize == 0x7FFFFFFFFFFFFFFFLL || bsize == 0x8000000000000000LL) &&
*__errno_location() == 34)
bsi... | int32_t xar_heap_to_archive(xar_t x) {
long bsize;
ssize_t r;
int off;
const char *opt;
char *b;
opt = xar_opt_get(x, "rsize");
if (!opt) {
bsize = 4096;
} else {
bsize = strtol(opt, NULL, 0);
if (((bsize == LONG_MAX) || (bsize == LONG_MIN)) && (errno == ERANGE)) {
bsize = 4096;
}... | xar_heap_to_archive | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
off_t xar_io_get_file_offset(xar_t x, xar_file_t f, xar_prop_t p) {
const char *opt;
const __xar_prop_t *tmpp;
tmpp = xar_prop_pget(p, "offset");
if (!tmpp)
return -1;
opt = xar_prop_getvalue(tmpp);
if (opt)
return strtoll(opt, 0, 0);
else
return -1;
} | off_t xar_io_get_file_offset(xar_t x, xar_file_t f, xar_prop_t p) {
xar_prop_t tmpp;
const char *opt = NULL;
tmpp = xar_prop_pget(p, "offset");
if (tmpp) {
opt = xar_prop_getvalue(tmpp);
if (opt == NULL) {
return -1;
}
return strtoll(opt, NULL, 0);
} else {
return -1;
}
} | xar_io_get_file_offset | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
off_t xar_io_get_heap_base_offset(xar_t x) { return x->toc_count + 28; } | off_t xar_io_get_heap_base_offset(xar_t x) {
return XAR(x)->toc_count + sizeof(xar_header_t);
} | xar_io_get_heap_base_offset | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
int64_t xar_io_get_length(xar_prop_t p) {
const char *opt;
long fsize;
const __xar_prop_t *tmpp;
opt = 0;
tmpp = xar_prop_pget(p, "length");
if (tmpp)
opt = xar_prop_getvalue(tmpp);
if (!opt)
return 0;
fsize = strtoll(opt, 0, 10);
if ((fsize == 0x7FFFFFFFFFFFFFFFLL || fsize == 0x8000000000000... | int64_t xar_io_get_length(xar_prop_t p) {
const char *opt = NULL;
int64_t fsize = 0;
xar_prop_t tmpp;
tmpp = xar_prop_pget(p, "length");
if (tmpp)
opt = xar_prop_getvalue(tmpp);
if (!opt) {
return 0;
} else {
fsize = strtoll(opt, NULL, 10);
if (((fsize == LLONG_MAX) || (fsize == LLONG_MIN... | xar_io_get_length | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
size_t xar_io_get_rsize(xar_t x) {
long bsize;
const char *opt;
opt = xar_opt_get(x, "rsize");
if (!opt)
return 4096;
bsize = strtol(opt, 0, 0);
if ((bsize == 0x7FFFFFFFFFFFFFFFLL || bsize == 0x8000000000000000LL) &&
*__errno_location() == 34)
return 4096;
return bsize;
} | size_t xar_io_get_rsize(xar_t x) {
size_t bsize;
const char *opt = NULL;
opt = xar_opt_get(x, "rsize");
if (!opt) {
bsize = 4096;
} else {
bsize = strtol(opt, NULL, 0);
if (((bsize == LONG_MAX) || (bsize == LONG_MIN)) && (errno == ERANGE)) {
bsize = 4096;
}
}
return bsize;
} | xar_io_get_rsize | xar-1.8-r2 | app-arch | O0/app-arch/xar-1.8-r2/libxar.so.1 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.