input stringlengths 28 169k | output stringlengths 20 317k |
|---|---|
static inline __u32 rta_getattr_u32(const struct rtattr *rta)
{
return *(__u32 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
}
| int rta_getattr_u32(struct_0 *a0) {
return a0->field_4;
}
|
static const char *tnl_encap_str(const char *name, int enabled, int port)
{
static const char ne[][sizeof("no")] = {
[0] = "no",
[1] = "",
};
static char buf[32];
char b1[16];
const char *val;
if (!port) {
val = "auto ";
} else if (port < 0) {
val = "";
} else {
snprintf(b1, sizeof(b1), "%u ", port - 1);
val = b1;
}
snprintf(buf, sizeof(buf), "%sencap-%s %s", ne[!!enabled], name, val);
return buf;
}
| int tnl_encap_str(unsigned long a0, unsigned long a1, unsigned long a2) {
unsigned long long v0;
char v1;
if (!a2) {
v0 = "auto ";
} else if (a2 < 0) {
v0 = &g_4014b6;
} else {
snprintf(&v1, 0x10, "%u ", a2 - 1);
v0 = &v1;
}
snprintf(&buf.8437, 0x20, "%sencap-%s %s", (4200203 + 3 * (a1)), a0, v0);
return &buf.8437;
}
|
static int detect_data_type(s)
deflate_state *s;
{
unsigned long block_mask = 0xf3ffc07fUL;
int n;
for (n = 0; n <= 31; n++, block_mask >>= 1)
if ((block_mask & 1) && (s->dyn_ltree[n].fc.freq != 0))
return 0;
if (s->dyn_ltree[9].fc.freq != 0 || s->dyn_ltree[10].fc.freq != 0
|| s->dyn_ltree[13].fc.freq != 0)
return 1;
for (n = 32; n < 256; n++)
if (s->dyn_ltree[n].fc.freq != 0)
return 1;
return 0;
}
| long detect_data_type(_WORD *a1)
{
int i;
int j;
unsigned long v4;
v4 = 4093624447LL;
for ( i = 0; i <= 31; ++i )
{
if ( (v4 & 1) != 0 && a1[2 * i + 106] )
return 0LL;
v4 >>= 1;
}
if ( a1[124] || a1[126] || a1[132] )
return 1LL;
for ( j = 32; j <= 255; ++j )
{
if ( a1[2 * j + 106] )
return 1LL;
}
return 0LL;
}
|
static long_int
tm_diff (long_int year, long_int yday, int hour, int min, int sec,
struct tm const *tp)
{
return ydhms_diff (year, yday, hour, min, sec,
tp->tm_year, tp->tm_yday,
tp->tm_hour, tp->tm_min, tp->tm_sec);
}
| void tm_diff(undefined8 param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4,
undefined4 param_5,undefined4 *param_6)
{
ydhms_diff(param_1,param_2,param_3,param_4,param_5,param_6[5],param_6[7],param_6[2],param_6[1],
*param_6);
return;
}
|
_Bool
force_conflicts(struct deppossi *possi)
{
return in_force(FORCE_CONFLICTS);
}
| void force_conflicts(void)
{
in_force(0x800);
return;
}
|
int get_email_protection_status(void)
{
if (batch) {
return cfg.email_protection_key;
} else {
return
read_yesno
("Will the certificate be used for email protection? (y/N): ",
0);
}
}
| long long get_email_protection_status() {
unsigned long long v1;
if (*(got.batch))
v1 = *((got.cfg + 596));
else
v1 = read_yesno("Will the certificate be used for email protection? (y/N): ", 0x0);
return v1;
}
|
FILE *
funopen(const void *cookie,
int (*readfn)(void *cookie, char *buf, int size),
int (*writefn)(void *cookie, const char *buf, int size),
off_t (*seekfn)(void *cookie, off_t offset, int whence),
int (*closefn)(void *cookie))
{
struct funopen_cookie *cookiewrap;
cookie_io_functions_t funcswrap = {
.read = funopen_read,
.write = funopen_write,
.seek = funopen_seek,
.close = funopen_close,
};
const char *mode;
if (readfn) {
if (writefn ==
((void *)0)
)
mode = "r";
else
mode = "r+";
} else if (writefn) {
mode = "w";
} else {
(*__errno_location ())
=
22
;
return
((void *)0)
;
}
cookiewrap = malloc(sizeof(*cookiewrap));
if (cookiewrap ==
((void *)0)
)
return
((void *)0)
;
cookiewrap->orig_cookie = (void *)cookie;
cookiewrap->readfn = readfn;
cookiewrap->writefn = writefn;
cookiewrap->seekfn = seekfn;
cookiewrap->closefn = closefn;
return fopencookie(cookiewrap, mode, funcswrap);
}
| long long funopen(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4) {
unsigned long long v0;
unsigned long long v1;
unsigned long long v2;
unsigned long long v3;
unsigned long long v4;
unsigned long long v5[5];
unsigned long long v6;
unsigned long long v7;
unsigned long long v8;
unsigned long long v9;
void* v11;
v6 = funopen_read;
v7 = funopen_write;
v8 = funopen_seek;
v9 = funopen_close;
if (a1) {
if (!a2)
v4 = "r";
else
v4 = "r+";
} else {
if (a2) {
v4 = "w";
} else {
*(__errno_location()) = 22;
v11 = 0;
return v11;
}
}
v5[0] = malloc(0x28);
if (!v5) {
v11 = 0;
return v11;
}
v5[0] = a0;
v5[1] = a1;
v5[2] = a2;
v5[3] = a3;
v5[4] = a4;
v3 = v9;
v2 = v8;
v1 = v7;
v0 = v6;
v11 = fopencookie(v5, v4, v4);
return v11;
}
|
static void close_files (void)
{
if ((gr_close () == 0) && !list) {
fprintf (
stderr
, gettext ("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
do { char *old_locale = setlocale (
6
,
((void *)0)
); char *saved_locale =
((void *)0)
; if (
((void *)0)
!= old_locale) { saved_locale = strdup (old_locale); } if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, "C"); } syslog (
3
, "failure while writing changes to %s", gr_dbname ()) ; if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, saved_locale); free (saved_locale); } } while (
0
);
fail_exit (2);
}
if (gr_locked) {
if (gr_unlock () == 0) {
fprintf (
stderr
, gettext ("%s: failed to unlock %s\n"), Prog, gr_dbname ());
do { char *old_locale = setlocale (
6
,
((void *)0)
); char *saved_locale =
((void *)0)
; if (
((void *)0)
!= old_locale) { saved_locale = strdup (old_locale); } if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, "C"); } syslog (
3
, "failed to unlock %s", gr_dbname ()) ; if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, saved_locale); free (saved_locale); } } while (
0
);
}
gr_locked =
0
;
}
if (is_shadowgrp) {
if ((sgr_close () == 0) && !list) {
fprintf (
stderr
, gettext ("%s: failure while writing changes to %s\n"), Prog, sgr_dbname ());
do { char *old_locale = setlocale (
6
,
((void *)0)
); char *saved_locale =
((void *)0)
; if (
((void *)0)
!= old_locale) { saved_locale = strdup (old_locale); } if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, "C"); } syslog (
3
, "failure while writing changes to %s", sgr_dbname ()) ; if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, saved_locale); free (saved_locale); } } while (
0
);
fail_exit (2);
}
if (sgr_locked) {
if (sgr_unlock () == 0) {
fprintf (
stderr
, gettext ("%s: failed to unlock %s\n"), Prog, sgr_dbname ());
do { char *old_locale = setlocale (
6
,
((void *)0)
); char *saved_locale =
((void *)0)
; if (
((void *)0)
!= old_locale) { saved_locale = strdup (old_locale); } if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, "C"); } syslog (
3
, "failed to unlock %s", sgr_dbname ()) ; if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, saved_locale); free (saved_locale); } } while (
0
);
}
sgr_locked =
0
;
}
}
}
| void close_files() {
void* v0;
void* v1;
void* v2;
void* v3;
char *v4;
char *v5;
char *v6;
char *v7;
unsigned long long v9;
unsigned long long v10;
unsigned long long v11;
unsigned long long v12;
unsigned long long v14;
unsigned long long v15;
unsigned long long v16;
unsigned long long v17;
if (!gr_close() && (list ^ 1)) {
v9 = gr_dbname();
fprintf(*(&stderr), gettext("%s: failure while writing changes to %s\n"));
v4 = setlocale(0x6, NULL);
v0 = 0;
if (v4)
v0 = strdup(v4);
if (v0)
setlocale(0x6, "C");
gr_dbname();
syslog(0x3, "failure while writing changes to %s");
if (v0) {
setlocale(0x6, v0);
free(v0);
}
fail_exit(0x2);
}
if (gr_locked) {
if (!gr_unlock()) {
v10 = gr_dbname();
fprintf(*(&stderr), gettext("%s: failed to unlock %s\n"));
v5 = setlocale(0x6, NULL);
v1 = 0;
if (v5)
v1 = strdup(v5);
if (v1)
setlocale(0x6, "C");
gr_dbname();
syslog(0x3, "failed to unlock %s");
if (v1) {
setlocale(0x6, v1);
free(v1);
}
}
gr_locked = 0;
}
v11 = is_shadowgrp;
if (is_shadowgrp) {
if (!sgr_close() && (list ^ 1)) {
v14 = sgr_dbname();
fprintf(*(&stderr), gettext("%s: failure while writing changes to %s\n"));
v6 = setlocale(0x6, NULL);
v2 = 0;
if (v6)
v2 = strdup(v6);
if (v2)
setlocale(0x6, "C");
sgr_dbname();
syslog(0x3, "failure while writing changes to %s");
if (v2) {
setlocale(0x6, v2);
free(v2);
}
fail_exit(0x2);
}
v12 = sgr_locked;
if (sgr_locked) {
if (!sgr_unlock()) {
v15 = sgr_dbname();
fprintf(*(&stderr), gettext("%s: failed to unlock %s\n"));
v7 = setlocale(0x6, NULL);
v3 = 0;
if (v7)
v3 = strdup(v7);
if (v3)
setlocale(0x6, "C");
sgr_dbname();
v16 = syslog(0x3, "failed to unlock %s");
if (v3) {
setlocale(0x6, v3);
v17 = free(v3);
}
}
sgr_locked = 0;
}
}
return;
}
|
static inline __u32 rta_getattr_u32(const struct rtattr *rta)
{
return *(__u32 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
}
| int rta_getattr_u32(struct_0 *a0) {
return a0->field_4;
}
|
static void check_blocks_extents(e2fsck_t ctx, struct problem_context *pctx,
struct process_block_struct *pb)
{
struct ext2_extent_info info;
struct ext2_inode *inode = pctx->inode;
ext2_extent_handle_t ehandle;
ext2_filsys fs = ctx->fs;
ext2_ino_t ino = pctx->ino;
errcode_t retval;
blk64_t eof_lblk;
struct ext3_extent_header *eh;
eh = (struct ext3_extent_header *) &inode->i_block[0];
retval = ext2fs_extent_header_verify(eh, sizeof(inode->i_block));
if (retval) {
if (fix_problem(ctx, 0x010081, pctx))
e2fsck_clear_inode(ctx, ino, inode, 0,
"check_blocks_extents");
pctx->errcode = 0;
return;
}
pctx->errcode = ext2fs_extent_open2(fs, ino, inode, &ehandle);
if (pctx->errcode) {
if (fix_problem(ctx, 0x010056, pctx))
e2fsck_clear_inode(ctx, ino, inode, 0,
"check_blocks_extents");
pctx->errcode = 0;
return;
}
retval = ext2fs_extent_get_info(ehandle, &info);
if (retval == 0) {
int max_depth = info.max_depth;
if (max_depth >= 5)
max_depth = 5 -1;
ctx->extent_depth_count[max_depth]++;
}
pctx->blk = info.max_depth;
pctx->blk2 = ext2fs_max_extent_depth(ehandle);
if (pctx->blk2 < pctx->blk &&
fix_problem(ctx, 0x01007F, pctx))
pb->eti.force_rebuild = 1;
pctx->blk = 5;
if (pctx->blk2 > pctx->blk)
fix_problem(ctx, 0x014005, pctx);
memset(pb->eti.ext_info, 0, sizeof(pb->eti.ext_info));
pb->eti.ino = pb->ino;
pb->next_lblock = 0;
eof_lblk = ((((inode)->i_size | ((__u64) (inode)->i_size_high << 32)) + fs->blocksize - 1) >>
((fs->super)->s_log_block_size + 10)) - 1;
scan_extent_node(ctx, pctx, pb, 0, 0, eof_lblk, ehandle, 1);
if (pctx->errcode &&
fix_problem(ctx, 0x010057, pctx)) {
pb->num_blocks = 0;
inode->i_blocks = 0;
e2fsck_clear_inode(ctx, ino, inode, 0x0004,
"check_blocks_extents");
pctx->errcode = 0;
}
ext2fs_extent_free(ehandle);
if ((((inode->i_mode) & 00170000) == 0040000) &&
e2fsck_dir_will_be_rehashed(ctx, ino))
return;
if (ctx->options & 0x4000)
e2fsck_rebuild_extents_later(ctx, ino);
else
e2fsck_should_rebuild_extents(ctx, pctx, &pb->eti, &info);
}
| void check_blocks_extents(struct_0 *a0, struct_1 *a1, struct_2 *a2) {
unsigned int v0;
unsigned int v1;
char v2;
struct_3 *v3;
struct_4 *v4;
unsigned long long v5;
unsigned long v6;
unsigned long long v7;
char v8;
char v9;
char v10;
unsigned long long *v12;
unsigned long long v13;
v3 = a1->field_18;
v4 = *(&a0->field_0);
v1 = a1->field_8;
v5 = &v3->padding_20[8];
v6 = ext2fs_extent_header_verify(v5, 0x3c);
if (v6) {
if (fix_problem(a0, 0x10081, a1))
e2fsck_clear_inode(a0, v1, v3, 0x0, "check_blocks_extents");
a1->field_0 = 0;
} else {
a1->field_0 = ext2fs_extent_open2(v4, v1, v3, &v2);
if (a1->field_0) {
if (fix_problem(a0, 0x10056, a1))
e2fsck_clear_inode(a0, v1, v3, 0x0, "check_blocks_extents");
a1->field_0 = 0;
} else {
v6 = ext2fs_extent_get_info(*(&v2), &v8, &v8);
if (!v6) {
v0 = *(&v9);
if (v0 > 4)
v0 = 4;
*(&a0[10].padding_1[15 + 4 * v0]) = *(&a0[10].padding_1[15 + 4 * v0]) + 1;
}
a1->field_28 = *(&v9);
a1->field_30 = ext2fs_max_extent_depth(*(&v2));
if (a1->field_30 < a1->field_28 && fix_problem(a0, 0x1007f, a1))
a2->field_6c = 1;
a1->field_28 = 5;
if (a1->field_30 > a1->field_28)
fix_problem(a0, 0x14005, a1);
memset(a2 + 1, 0x0, 0x28);
a2->field_68 = a2->field_0;
a2->field_60 = 0;
v7 = (v4->field_28 + (v3->field_4 | v3->field_6c * 0x100000000) - 1 >> ((v4->field_20->field_18 + 10) & 63)) - 1;
scan_extent_node(a0, a1, a2, 0x0, 0x0, v7, *(&v2), 0x1);
if (a1->field_0 && fix_problem(a0, 0x10057, a1)) {
a2->field_8 = 0;
v3->field_1c = 0;
e2fsck_clear_inode(a0, v1, v3, 0x4, "check_blocks_extents");
a1->field_0 = 0;
}
ext2fs_extent_free(*(&v2));
if ((v3->field_0 & 0xf000) != 0x4000 || !e2fsck_dir_will_be_rehashed(a0, v1, v1)) {
if (!(a0->field_4c & 0x4000))
e2fsck_should_rebuild_extents(a0, a1, &a2->field_68, &v8);
else
e2fsck_rebuild_extents_later(a0, v1, v1);
}
}
}
v13 = *(&v10) ^ v12[5];
return;
}
|
static
_Bool
extra_mode (mode_t input)
{
mode_t mask =
((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3))
|
0170000
;
return !! (input & ~ mask);
}
| uint extra_mode(uint param_1)
{
return param_1 & 0xffff0e00 | (uint)((param_1 & 0xffff0e00) != 0);
}
|
static
void cont_handler(int sig __attribute__((unused)))
{
got_cont = 1;
}
| long long cont_handler(unsigned long a0) {
unsigned int v0;
unsigned long v2;
v0 = a0;
got_cont = 1;
return v2;
}
|
int
ssh_set_newkeys(struct ssh *ssh, int mode)
{
struct session_state *state = ssh->state;
struct sshenc *enc;
struct sshmac *mac;
struct sshcomp *comp;
struct sshcipher_ctx **ccp;
struct packet_state *ps;
u_int64_t *max_blocks;
const char *wmsg;
int r, crypt_type;
const char *dir = mode == MODE_OUT ? "out" : "in";
sshlog("packet.c", __func__, 874, 1, SYSLOG_LEVEL_DEBUG2,
((void *)0)
, "mode %d", mode);
if (mode == MODE_OUT) {
ccp = &state->send_context;
crypt_type = 1;
ps = &state->p_send;
max_blocks = &state->max_blocks_out;
} else {
ccp = &state->receive_context;
crypt_type = 0;
ps = &state->p_read;
max_blocks = &state->max_blocks_in;
}
if (state->newkeys[mode] !=
((void *)0)
) {
sshlog("packet.c", __func__, 888, 1, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "rekeying %s, input %llu bytes %llu blocks, " "output %llu bytes %llu blocks", dir, (unsigned long long)state->p_read.bytes, (unsigned long long)state->p_read.blocks, (unsigned long long)state->p_send.bytes, (unsigned long long)state->p_send.blocks)
;
kex_free_newkeys(state->newkeys[mode]);
state->newkeys[mode] =
((void *)0)
;
}
ps->packets = ps->blocks = 0;
if ((state->newkeys[mode] = ssh->kex->newkeys[mode]) ==
((void *)0)
)
return -1;
ssh->kex->newkeys[mode] =
((void *)0)
;
enc = &state->newkeys[mode]->enc;
mac = &state->newkeys[mode]->mac;
comp = &state->newkeys[mode]->comp;
if (cipher_authlen(enc->cipher) == 0) {
if ((r = mac_init(mac)) != 0)
return r;
}
mac->enabled = 1;
;
cipher_free(*ccp);
*ccp =
((void *)0)
;
if ((r = cipher_init(ccp, enc->cipher, enc->key, enc->key_len,
enc->iv, enc->iv_len, crypt_type)) != 0)
return r;
if (!state->cipher_warning_done &&
(wmsg = cipher_warning_message(*ccp)) !=
((void *)0)
) {
sshlog("packet.c", __func__, 919, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Warning: %s", wmsg);
state->cipher_warning_done = 1;
}
if ((comp->type == 1 ||
(comp->type == 2 &&
state->after_authentication)) && comp->enabled == 0) {
if ((r = ssh_packet_init_compression(ssh)) < 0)
return r;
if (mode == MODE_OUT) {
if ((r = start_compression_out(ssh, 6)) != 0)
return r;
} else {
if ((r = start_compression_in(ssh)) != 0)
return r;
}
comp->enabled = 1;
}
if (enc->block_size >= 16)
*max_blocks = (u_int64_t)1 << (enc->block_size*2);
else
*max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
if (state->rekey_limit)
*max_blocks = (((*max_blocks) < (state->rekey_limit / enc->block_size)) ? (*max_blocks) : (state->rekey_limit / enc->block_size))
;
sshlog("packet.c", __func__, 952, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "rekey %s after %llu blocks", dir, (unsigned long long)*max_blocks)
;
return 0;
}
| int ssh_set_newkeys(unsigned long long a0[2], unsigned long a1) {
unsigned long long v0;
unsigned long v1;
unsigned long v2;
unsigned long v3;
unsigned long v4;
unsigned long v5;
unsigned int v6;
unsigned int v7;
unsigned long long *v8;
struct_4 *v9;
unsigned long long *v10;
struct_2 *v11;
unsigned long v12;
struct_1 *v13;
struct_3 *v14;
unsigned int v15[2];
unsigned long v16;
unsigned long v18;
unsigned long long v19;
unsigned long v20;
v11 = a0[0];
if (a1 == 1)
v18 = "out";
else
v18 = "in";
v12 = v18;
v5 = a1;
v4 = "mode %d";
sshlog("packet.c", "ssh_set_newkeys", 0x36a, 0x1, 0x6, 0x0);
if (a1 == 1) {
v8 = &v11->padding_0[24];
v6 = 1;
v9 = &v11->padding_180;
v10 = &v11->padding_198[8];
} else {
v8 = &v11->padding_0[16];
v6 = 0;
v9 = &v11->padding_14c[28];
v10 = &v11->padding_198[0];
}
if (*(&v11->padding_14c[12 + 8 * a1])) {
v5 = v11->field_188;
v4 = v11->field_190;
v3 = v11->field_170;
v2 = v11->field_178;
v1 = v12;
v0 = "rekeying %s, input %llu bytes %llu blocks, output %llu bytes %llu blocks";
sshlog("packet.c", "ssh_set_newkeys", 0x378, 0x1, 0x5, 0x0);
kex_free_newkeys(*(&v11->padding_14c[12 + 8 * a1]));
*(&v11->padding_14c[12 + 8 * a1]) = 0;
}
v9->field_8 = 0;
v9->field_4 = 0;
*(&v11->padding_14c[12 + 8 * a1]) = *((a0[1] + a1 * 8));
if (!*(&v11->padding_14c[12 + 8 * a1])) {
*(&v18) = -1;
} else {
*((a0[1] + a1 * 8)) = 0;
v13 = *(&v11->padding_14c[12 + 8 * a1]);
v14 = *(&v11->padding_14c[12 + 8 * a1]) + 48;
*(&v15[0]) = *(&v11->padding_14c[12 + 8 * a1]) + 104;
v18 = cipher_authlen(v13->field_8);
if (!v18) {
v7 = mac_init(v14);
if (v7)
*(&v18) = v7;
}
if (!v7 || v18) {
v14->field_8 = 1;
cipher_free(*(v8));
*(v8) = 0;
v4 = v6;
v7 = cipher_init(v8, v13->field_8, v13->field_20, v13->field_14, v13->field_28, v13->field_18);
if (v7) {
*(&v18) = v7;
} else {
if (!v11->field_1ec) {
v16 = cipher_warning_message(*(v8));
if (v16) {
v5 = v16;
v4 = "Warning: %s";
sshlog("packet.c", "ssh_set_newkeys", 0x397, 0x0, 0x2, 0x0);
v11->field_1ec = 1;
}
}
if (!v15[1] && (v15[0] == 1 || v15[0] == 2) && (v15[0] == 1 || v11->field_148)) {
v7 = ssh_packet_init_compression(a0);
if (v7 < 0) {
*(&v18) = v7;
} else {
if (a1 == 1) {
v7 = start_compression_out(a0, 0x6);
if (v7)
*(&v18) = v7;
} else {
v7 = start_compression_in(a0);
if (v7)
*(&v18) = v7;
}
if ((a1 == 1 || !v7) && (!v7 || a1 != 1))
v15[1] = 1;
}
}
if (v15[1] || !v11->field_148 && v15[0] != 1 || v15[0] != 1 && v15[0] != 2 || a1 == 1 && !v7 && v7 >= 0 || !v7 && a1 != 1 && v7 >= 0) {
if (v13->field_1c > 15) {
if (((v13->field_1c << 1) & 63))
v19 = 1 << ((v13->field_1c * 2) & 63);
else
v19 = 1 << ((v13->field_1c * 2) & 63);
*(v10) = v19;
} else {
*(v10) = 0x40000000 /m v13->field_1c;
}
if (v11->field_1a8) {
v20 = (0 CONCAT v11->field_1a8) /m v13->field_1c;
if ((0 CONCAT v11->field_1a8) /m v13->field_1c > (0 CONCAT v11->field_1a8) /m v13->field_1c)
v20 = *(((0 CONCAT v11->field_1a8) /m v13->field_1c));
*(v10) = v20;
}
v4 = *(v10);
v3 = v12;
v2 = "rekey %s after %llu blocks";
sshlog("packet.c", "ssh_set_newkeys", 0x3b8, 0x0, 0x5, 0x0);
*(&v18) = 0;
}
}
}
}
return v18;
}
|
void
sv_locale (name)
char *name;
{
char *v;
int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A')
r = set_lang (name, v);
else
r = set_locale_var (name, v);
if (r == 0 && posixly_correct)
set_exit_status (1);
}
| long long sv_locale(char a0[2]) {
unsigned int v0;
unsigned long long v1;
unsigned long long v3;
v1 = get_string_value(a0);
if (a0[0] == 76 && a0[1] == 65) {
v3 = set_lang(a0, v1, v1);
v0 = v3;
goto LABEL_40b160;
}
v3 = set_locale_var(a0, v1, v1);
v0 = v3;
LABEL_40b160:
if (!v0) {
v3 = posixly_correct;
if (posixly_correct)
v3 = set_exit_status(0x1);
}
return v3;
}
|
static int
dynamic_complete_history (count, key)
int count, key;
{
int r;
rl_compentry_func_t *orig_func;
rl_completion_func_t *orig_attempt_func;
rl_compignore_func_t *orig_ignore_func;
orig_func = rl_completion_entry_function;
orig_attempt_func = rl_attempted_completion_function;
orig_ignore_func = rl_ignore_some_completions_function;
rl_completion_entry_function = history_completion_generator;
rl_attempted_completion_function = (rl_completion_func_t *)
((void *)0)
;
rl_ignore_some_completions_function = filename_completion_ignore;
if (rl_last_func == dynamic_complete_history)
r = rl_complete_internal ('?');
else
r = rl_complete_internal ('\t');
rl_completion_entry_function = orig_func;
rl_attempted_completion_function = orig_attempt_func;
rl_ignore_some_completions_function = orig_ignore_func;
return r;
}
| long long dynamic_complete_history(unsigned long a0, unsigned long a1) {
unsigned int v0;
unsigned int v1;
unsigned int v2;
unsigned long long v3;
unsigned long long v4;
unsigned long long v5;
v1 = a0;
v0 = a1;
v3 = rl_completion_entry_function;
v4 = rl_attempted_completion_function;
v5 = rl_ignore_some_completions_function;
rl_completion_entry_function = history_completion_generator;
rl_attempted_completion_function = 0;
rl_ignore_some_completions_function = filename_completion_ignore;
if (rl_last_func == dynamic_complete_history)
v2 = rl_complete_internal(0x3f);
else
v2 = rl_complete_internal(0x9);
rl_completion_entry_function = v3;
rl_attempted_completion_function = v4;
rl_ignore_some_completions_function = v5;
return v2;
}
|
static inline void _show(const char *fmt, ...)
{
va_list args;
if (!do_show && verbose <=
4
)
return;
__builtin_va_start(
args
,
fmt
)
;
vfprintf(
stdout
, fmt, args);
fflush(
stdout
);
__builtin_va_end(
args
)
;
}
| void _show(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8,char *param_9,
undefined8 param_10,undefined8 param_11,undefined8 param_12,undefined8 param_13,
undefined8 param_14)
{
char in_AL;
long in_FS_OFFSET;
undefined4 local_d8;
undefined4 local_d4;
undefined *local_d0;
undefined *local_c8;
long local_c0;
undefined local_b8 [8];
undefined8 local_b0;
undefined8 local_a8;
undefined8 local_a0;
undefined8 local_98;
undefined8 local_90;
undefined4 local_88;
undefined4 local_78;
undefined4 local_68;
undefined4 local_58;
undefined4 local_48;
undefined4 local_38;
undefined4 local_28;
undefined4 local_18;
if (in_AL != '\0') {
local_88 = param_1;
local_78 = param_2;
local_68 = param_3;
local_58 = param_4;
local_48 = param_5;
local_38 = param_6;
local_28 = param_7;
local_18 = param_8;
}
local_c0 = *(long *)(in_FS_OFFSET + 0x28);
local_b0 = param_10;
local_a8 = param_11;
local_a0 = param_12;
local_98 = param_13;
local_90 = param_14;
if ((do_show != 0) || (4 < verbose)) {
local_d8 = 8;
local_d4 = 0x30;
local_d0 = &stack0x00000008;
local_c8 = local_b8;
vfprintf(stdout,param_9,&local_d8);
fflush(stdout);
}
if (local_c0 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return;
}
|
int
do_fsync(struct sftp_conn *conn, u_char *handle, u_int handle_len)
{
struct sshbuf *msg;
u_int status, id;
int r;
if ((conn->exts & 0x00000010) == 0)
return -1;
sshlog("sftp-client.c", __func__, 1336, 0, SYSLOG_LEVEL_DEBUG2,
((void *)0)
, "Sending SSH2_FXP_EXTENDED(fsync@openssh.com)");
if ((msg = sshbuf_new()) ==
((void *)0)
)
sshfatal("sftp-client.c", __func__, 1340, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "sshbuf_new failed");
id = conn->msg_id++;
if ((r = sshbuf_put_u8(msg, 200)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_cstring(msg, "fsync@openssh.com")) != 0 ||
(r = sshbuf_put_string(msg, handle, handle_len)) != 0)
sshfatal("sftp-client.c", __func__, 1346, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "compose");
send_msg(conn, msg);
sshlog("sftp-client.c", __func__, 1348, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "Sent message fsync@openssh.com I:%u", id);
sshbuf_free(msg);
status = get_status(conn, id);
if (status != 0)
sshlog("sftp-client.c", __func__, 1353, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "remote fsync: %s", fx2txt(status));
return status == 0 ? 0 : -1;
}
| long do_fsync(unsigned int *a1, long a2, unsigned int a3)
{
unsigned int v4;
long v5;
const char *v6;
unsigned int v8;
unsigned int v9;
unsigned int status;
long v11;
if ( (a1[7] & 0x10) == 0 )
return 0xFFFFFFFFLL;
sshlog("sftp-client.c", "do_fsync", 1336LL, 0LL, 6LL, 0LL, "Sending SSH2_FXP_EXTENDED(fsync@openssh.com)");
v11 = sshbuf_new();
if ( !v11 )
sshfatal("sftp-client.c", "do_fsync", 1340LL, 1LL, 1LL, 0LL, "sshbuf_new failed");
v4 = a1[6];
a1[6] = v4 + 1;
v9 = v4;
v8 = sshbuf_put_u8(v11, 200LL);
if ( v8
|| (v8 = sshbuf_put_u32(v11, v9)) != 0
|| (v8 = sshbuf_put_cstring(v11, "fsync@openssh.com")) != 0
|| (v8 = sshbuf_put_string(v11, a2, a3)) != 0 )
{
v5 = ssh_err(v8);
sshfatal("sftp-client.c", "do_fsync", 1346LL, 1LL, 1LL, v5, "compose");
}
send_msg((long)a1, v11);
sshlog("sftp-client.c", "do_fsync", 1348LL, 0LL, 7LL, 0LL, "Sent message fsync@openssh.com I:%u", v9);
sshbuf_free(v11);
status = get_status(a1, v9);
if ( !status )
return 0LL;
v6 = (const char *)fx2txt(status);
sshlog("sftp-client.c", "do_fsync", 1353LL, 0LL, 2LL, 0LL, "remote fsync: %s", v6);
return 0xFFFFFFFFLL;
}
|
static int
env_permitted(const char *env)
{
u_int i;
int ret;
char name[1024], *cp;
if ((cp = strchr(env, '=')) ==
((void *)0)
|| cp == env)
return 0;
ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env);
if (ret <= 0 || (size_t)ret >= sizeof(name)) {
sshlog("mux.c", __func__, 253, 1, SYSLOG_LEVEL_ERROR,
((void *)0)
, "name '%.100s...' too long", env);
return 0;
}
for (i = 0; i < options.num_send_env; i++)
if (match_pattern(name, options.send_env[i]))
return 1;
return 0;
}
| int env_permitted(char *a0) {
unsigned long v0;
unsigned int v1;
unsigned int v2;
unsigned long long v3;
char v4;
unsigned int v6;
v3 = strchr(a0, 0x3d);
if (v3 && v3 != a0) {
v2 = snprintf(&v4, 0x400, "%.*s", __subvdi3(v3, a0));
if (v2 > 0 && v2 <= 1023) {
v1 = 0;
while (true) {
if (v1 < *(5247900)) {
v6 = match_pattern(&v4, *((*(5247904) + v1 * 8)), *((*(5247904) + v1 * 8)));
if (v6) {
v6 = 1;
break;
} else {
v1 += 1;
}
} else {
v6 = 0;
break;
}
}
}
if (v2 <= 0 || v2 > 1023) {
v0 = a0;
sshlog("mux.c", "env_permitted", 0xfd, 0x1, 0x2, 0x0, "name '%.100s...' too long");
v6 = 0;
}
}
if (!v3 || v3 == a0)
v6 = 0;
return v6;
}
|
char *
endofname(const char *name)
{
char *p;
p = (char *) name;
if (! ((*p) == '_' ||
((*__ctype_b_loc ())[(int) ((
(unsigned char)(*p)
))] & (unsigned short int) _ISalpha)
))
return p;
while (*++p) {
if (! ((*p) == '_' ||
((*__ctype_b_loc ())[(int) ((
(unsigned char)(*p)
))] & (unsigned short int) _ISalnum)
))
break;
}
return p;
}
| int endofname(unsigned long a0) {
char *v0;
unsigned int v3;
unsigned int v4;
unsigned int v5;
v0 = a0;
if (*(v0) != 95) {
v3 = *((*(v0) * 2 + *(__ctype_b_loc()))) & 0x400;
if (!v3) {
v4 = v0;
goto LABEL_402dd5;
}
}
while (true) {
v0 += 1;
if (!*(v0))
break;
if (*(v0) == 95)
continue;
*(&v3) = *((*(v0) * 2 + *(__ctype_b_loc())));
v5 = v3 & 8;
if (!v5)
break;
}
v4 = v0;
LABEL_402dd5:
return v4;
}
|
size_t
bitmap_nbytes(struct bitmap *b)
{
return (bitmap_nbits(b) + 7) / 8;
}
| unsigned long bitmap_nbytes(_QWORD *a1)
{
return (unsigned long)(bitmap_nbits(a1) + 7) >> 3;
}
|
static
_Bool
change_attributes (char const *name, int dirfd, char const *relname)
{
_Bool
ok =
0
;
if (! (owner_id == (uid_t) -1 && group_id == (gid_t) -1)
&& lchownat (dirfd, relname, owner_id, group_id) != 0)
error (0,
(*__errno_location ())
, gettext ("cannot change ownership of %s"), quotearg_style (shell_escape_always_quoting_style, name));
else if (chmodat (dirfd, relname, mode) != 0)
error (0,
(*__errno_location ())
, gettext ("cannot change permissions of %s"), quotearg_style (shell_escape_always_quoting_style, name));
else
ok =
1
;
if (use_default_selinux_context)
setdefaultfilecon (name);
return ok;
}
| void change_attributes(unsigned long long a0, unsigned long a1, unsigned long long a2) {
char v0;
unsigned long long v2;
unsigned long long v3;
unsigned long long v4;
v0 = 0;
if (owner_id == -1 && group_id == -1)
goto LABEL_400ef0;
if (lchownat(a1, a2, owner_id, group_id)) {
v2 = quotearg_style(0x4, a0);
error(0x0, *(__errno_location()), gettext("cannot change ownership of %s"));
goto LABEL_400f52;
}
LABEL_400ef0:
if (!chmodat(a1, a2, mode, a2)) {
v0 = 1;
} else {
v3 = quotearg_style(0x4, a0);
error(0x0, *(__errno_location()), gettext("cannot change permissions of %s"));
}
LABEL_400f52:
if (use_default_selinux_context)
setdefaultfilecon(a0);
v4 = v0;
return;
}
|
int
rl_alphabetic (int c)
{
if ((1 && (1 &&
((*__ctype_b_loc ())[(int) ((
(unsigned char)c
))] & (unsigned short int) _ISalnum)
)))
return (1);
return (_rl_allow_pathname_alphabetic_chars &&
strchr (pathname_alphabetic_chars, c) !=
((void *)0)
);
}
| undefined8 rl_alphabetic(uint param_1)
{
ushort **ppuVar1;
undefined8 uVar2;
char *pcVar3;
ppuVar1 = __ctype_b_loc();
if (((*ppuVar1)[param_1 & 0xff] & 8) == 0) {
if ((_rl_allow_pathname_alphabetic_chars != 0) &&
(pcVar3 = strchr("/-_=~.#$",param_1), pcVar3 != (char *)0x0)) {
return 1;
}
uVar2 = 0;
}
else {
uVar2 = 1;
}
return uVar2;
}
|
static inline void
emit_ancillary_info (char const *program)
{
struct infomap { char const *program; char const *node; } const infomap[] = {
{ "[", "test invocation" },
{ "coreutils", "Multi-call invocation" },
{ "sha224sum", "sha2 utilities" },
{ "sha256sum", "sha2 utilities" },
{ "sha384sum", "sha2 utilities" },
{ "sha512sum", "sha2 utilities" },
{
((void *)0)
,
((void *)0)
}
};
char const *node = program;
struct infomap const *map_prog = infomap;
while (map_prog->program && ! (strcmp (program, map_prog->program) == 0))
map_prog++;
if (map_prog->node)
node = map_prog->node;
printf (gettext ("\n%s online help: <%s>\n"), "GNU coreutils", "https:
char const *lc_messages = setlocale (
5
,
((void *)0)
);
if (lc_messages && strncmp (lc_messages, "" "en_" "", sizeof ("en_") - 1))
{
fputs_unlocked (gettext ("Report any translation bugs to " "<https:
stdout
)
;
}
char const *url_program = (strcmp (program, "[") == 0) ? "test" : program;
printf (gettext ("Full documentation <%s%s>\n"),
"https:
printf (gettext ("or available locally via: info '(coreutils) %s%s'\n"),
node, node == program ? " invocation" : "");
}
| void emit_ancillary_info(char *a0) {
unsigned long v0;
unsigned long long v1[2];
char *v2;
unsigned long long v3;
unsigned long long v4;
unsigned long long v5;
unsigned long long v6;
unsigned long long v7;
unsigned long long v8;
unsigned long long v9;
unsigned long long v10;
unsigned long long v11;
unsigned long long v12;
unsigned long long v13;
unsigned long long v14;
unsigned long long v15;
void* v16;
void* v17;
char v18;
unsigned long long v20;
unsigned long long *v21;
unsigned long long v22;
v4 = "[";
v5 = "test invocation";
v6 = "coreutils";
v7 = "Multi-call invocation";
v8 = "sha224sum";
v9 = "sha2 utilities";
v10 = "sha256sum";
v11 = "sha2 utilities";
v12 = "sha384sum";
v13 = "sha2 utilities";
v14 = "sha512sum";
v15 = "sha2 utilities";
v16 = 0;
v17 = 0;
v0 = a0;
v1[0] = &v4;
while (true) {
if (!v1[0])
break;
if (!strcmp(a0, v1[0]))
break;
v1[0] = v1 + 1;
}
if (v1[1])
v0 = v1[1];
printf(gettext("\n%s online help: <%s>\n"));
v2 = setlocale(0x5, NULL);
if (v2 && strncmp(v2, "en_", 0x3))
fputs_unlocked(gettext("Report any translation bugs to <https:
if (!strcmp(a0, "["))
v20 = "test";
else
v20 = a0;
v3 = v20;
printf(gettext("Full documentation <%s%s>\n"));
printf(gettext("or available locally via: info '(coreutils) %s%s'\n"));
v22 = *(&v18) ^ v21[5];
return;
}
|
0
)
do { fprintf (
stderr
, gettext ("Try '%s --help' for more information.\n"), program_name); } while (0);
| int fprintf(FILE *__stream,char *__format,...)
{
halt_baddata();
}
|
void
__new_obj_p_here(int magic, void *here)
{
obj_prefix *obj_p = here;
obj_p->p_magic = (long)magic;
obj_p->p_flags = 0;
}
| long long __new_obj_p_here(unsigned long a0, unsigned short a1[2]) {
a1[0] = a0;
a1[1] = 0;
return a1;
}
|
static int add_passwd (struct passwd *pwd, const char *password)
{
const struct spwd *sp;
struct spwd spent;
char *cp;
void *crypt_arg =
((void *)0)
;
if (
((void *)0)
!= crypt_method) {
if (sflg) {
if ( (0 == strcmp (crypt_method, "SHA256"))
|| (0 == strcmp (crypt_method, "SHA512"))) {
crypt_arg = &sha_rounds;
}
}
}
if (!is_shadow) {
return update_passwd (pwd, password);
}
sp = spw_locate (pwd->pw_name);
if (
((void *)0)
!= sp) {
spent = *sp;
if ( (
((void *)0)
!= crypt_method)
&& (0 == strcmp(crypt_method, "NONE"))) {
spent.sp_pwdp = (char *)password;
} else {
const char *salt = crypt_make_salt (crypt_method,
crypt_arg);
cp = pw_encrypt (password, salt);
if (
((void *)0)
== cp) {
fprintf (
stderr
,
gettext ("%s: failed to crypt password with salt '%s': %s\n"),
Prog, salt, strerror (
(*__errno_location ())
));
return 1;
}
spent.sp_pwdp = cp;
}
spent.sp_lstchg = (long) gettime () / (24L*3600L);
if (0 == spent.sp_lstchg) {
spent.sp_lstchg = -1;
}
return (spw_update (&spent) == 0);
}
if (strcmp (pwd->pw_passwd, "x") != 0) {
return update_passwd (pwd, password);
}
spent.sp_namp = pwd->pw_name;
if ((crypt_method !=
((void *)0)
) && (0 == strcmp(crypt_method, "NONE"))) {
spent.sp_pwdp = (char *)password;
} else {
const char *salt = crypt_make_salt (crypt_method, crypt_arg);
cp = pw_encrypt (password, salt);
if (
((void *)0)
== cp) {
fprintf (
stderr
,
gettext ("%s: failed to crypt password with salt '%s': %s\n"),
Prog, salt, strerror (
(*__errno_location ())
));
return 1;
}
spent.sp_pwdp = cp;
}
spent.sp_lstchg = (long) gettime () / (24L*3600L);
if (0 == spent.sp_lstchg) {
spent.sp_lstchg = -1;
}
spent.sp_min = getdef_num ("PASS_MIN_DAYS", 0);
spent.sp_max = getdef_num ("PASS_MAX_DAYS", 10000);
spent.sp_warn = getdef_num ("PASS_WARN_AGE", -1);
spent.sp_inact = -1;
spent.sp_expire = -1;
spent.sp_flag = ((unsigned long int)-1);
return (spw_update (&spent) == 0);
}
| long add_passwd(long a1, long a2)
{
long v3;
long v4;
long v5;
long v6;
int *v7;
char *v8;
long v9;
char *v10;
int *v11;
char *v12;
long v13;
char *v14;
void *v15;
long *v16;
long v17;
long v18;
long v19;
long salt;
long v21;
long v22;
long v23;
long v24;
long v25;
long v26;
long v27;
long v28;
long v29;
unsigned long v30;
v30 = __readfsqword(0x28u);
v15 = 0LL;
if ( crypt_method && sflg && (!strcmp(crypt_method, "SHA256") || !strcmp(crypt_method, "SHA512")) )
v15 = &sha_rounds;
if ( is_shadow != 1 )
return update_passwd(a1, a2);
v16 = (long *)spw_locate(*(_QWORD *)a1);
if ( v16 )
{
v3 = v16[1];
v21 = *v16;
v22 = v3;
v4 = v16[3];
v23 = v16[2];
v24 = v4;
v5 = v16[5];
v25 = v16[4];
v26 = v5;
v6 = v16[7];
v27 = v16[6];
v28 = v6;
v29 = v16[8];
if ( crypt_method && !strcmp(crypt_method, "NONE") )
{
v22 = a2;
}
else
{
salt = crypt_make_salt(crypt_method, v15);
v18 = pw_encrypt(a2, salt);
if ( !v18 )
{
v7 = _errno_location();
v8 = strerror(*v7);
v9 = Prog;
v10 = gettext("%s: failed to crypt password with salt '%s': %s\n");
fprintf(stderr, v10, v9, salt, v8);
return 1LL;
}
v22 = v18;
}
v23 = gettime() / 86400;
if ( !v23 )
v23 = -1LL;
return (unsigned int)spw_update(&v21) == 0;
}
else
{
if ( strcmp(*(const char **)(a1 + 8), "x") )
return update_passwd(a1, a2);
v21 = *(_QWORD *)a1;
if ( crypt_method && !strcmp(crypt_method, "NONE") )
{
v22 = a2;
}
else
{
v17 = crypt_make_salt(crypt_method, v15);
v19 = pw_encrypt(a2, v17);
if ( !v19 )
{
v11 = _errno_location();
v12 = strerror(*v11);
v13 = Prog;
v14 = gettext("%s: failed to crypt password with salt '%s': %s\n");
fprintf(stderr, v14, v13, v17, v12);
return 1LL;
}
v22 = v19;
}
v23 = gettime() / 86400;
if ( !v23 )
v23 = -1LL;
v24 = (int)getdef_num("PASS_MIN_DAYS", 0LL);
v25 = (int)getdef_num("PASS_MAX_DAYS", 10000LL);
v26 = (int)getdef_num("PASS_WARN_AGE", 0xFFFFFFFFLL);
v27 = -1LL;
v28 = -1LL;
v29 = -1LL;
return (unsigned int)spw_update(&v21) == 0;
}
}
|
void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family)
{
const char *value;
inet_prefix dst;
if (!rta) {
value = "any";
} else if (get_addr_rta(&dst, rta, family)) {
value = "unknown";
} else if (dst.flags & ADDRTYPE_UNSPEC) {
value = "any";
} else {
value = format_host(family, dst.bytelen, dst.data);
if (!value)
value = "unknown";
}
print_string_name_value(name, value);
print_string(PRINT_FP,
((void *)0)
, " ",
((void *)0)
);
}
| long long tnl_print_endpoint(unsigned long long a0, unsigned long long a1, unsigned long a2) {
unsigned long long v0;
char v1;
char v2;
char v3;
if (!a1) {
v0 = "any";
} else if (get_addr_rta(&v1, a1, a2, a1)) {
v0 = "unknown";
} else if ((*(&v1) & 4)) {
v0 = "any";
} else {
v0 = format_host(a2, *(&v2), &v3, *(&v2));
if (!v0)
v0 = "unknown";
}
print_string_name_value(a0, v0, v0);
print_string(0x1, 0x0, " ", 0x0);
return 0;
}
|
static void
print_arith_for_command (arith_for_command)
ARITH_FOR_COM *arith_for_command;
{
cprintf ("for ((");
command_print_word_list (arith_for_command->init, " ");
cprintf ("; ");
command_print_word_list (arith_for_command->test, " ");
cprintf ("; ");
command_print_word_list (arith_for_command->step, " ");
cprintf ("))");
newline ("do\n");
indentation += indentation_amount;
make_command_string_internal (arith_for_command->action);
do { if (deferred_heredocs) print_deferred_heredocs (""); } while (0);
semicolon ();
indentation -= indentation_amount;
newline ("done");
}
| void print_arith_for_command(unsigned long long a0[5]) {
unsigned long long v1;
cprintf("for ((");
command_print_word_list(a0[1], " ");
cprintf("; ");
command_print_word_list(a0[2], " ");
cprintf("; ");
command_print_word_list(a0[3], " ");
cprintf("))");
newline("do\n");
indentation = indentation_amount + indentation;
make_command_string_internal(a0[4]);
if (deferred_heredocs)
print_deferred_heredocs(&g_403583);
semicolon();
indentation = indentation - indentation_amount;
v1 = newline("done");
return;
}
|
static
_Bool
and (void)
{
_Bool
value =
1
;
while (
1
)
{
value &= term ();
if (! (pos < argc && (strcmp (argv[pos], "-a") == 0)))
return value;
advance (
0
);
}
}
| bool and(void)
{
byte bVar1;
int iVar2;
bool local_9;
local_9 = true;
while( true ) {
bVar1 = term();
local_9 = (bVar1 & local_9) != 0;
if (argc <= pos) {
return local_9;
}
iVar2 = strcmp(*(char **)(argv + (long)pos * 8),"-a");
if (iVar2 != 0) break;
advance(0);
}
return local_9;
}
|
size_t
blocking_write (int fd, void const *buf, size_t count)
{
size_t bytes = full_write (fd, buf, count);
if (bytes < count &&
(*__errno_location ())
==
11
)
{
int flags =
rpl_fcntl
(fd,
3
);
if (0 <= flags && flags &
04000
&&
rpl_fcntl
(fd,
4
, flags & ~
04000
) != -1)
{
char const *buffer = buf;
bytes += full_write (fd, buffer + bytes, count - bytes);
}
}
return bytes;
}
| ulong blocking_write(undefined4 param_1,long param_2,ulong param_3)
{
uint uVar1;
int iVar2;
int *piVar3;
long lVar4;
ulong local_18;
local_18 = full_write(param_1,param_2,param_3);
if (local_18 < param_3) {
piVar3 = __errno_location();
if (*piVar3 == 0xb) {
uVar1 = rpl_fcntl(param_1,3);
if ((-1 < (int)uVar1) && ((uVar1 & 0x800) != 0)) {
iVar2 = rpl_fcntl(param_1,4,uVar1 & 0xfffff7ff);
if (iVar2 != -1) {
lVar4 = full_write(param_1,param_2 + local_18,param_3 - local_18);
local_18 = local_18 + lVar4;
}
}
}
}
return local_18;
}
|
inline int ext2fs_test_valid(ext2_filsys fs)
{
return (fs->flags & 0x08);
}
| void ext2fs_test_valid(void)
{
halt_baddata();
}
|
static void rsync_roll(unsigned int start, unsigned int num)
{
unsigned i;
if (start < 4096) {
for (i = start; i < 4096; i++) {
if (i == start + num)
return;
rsync_sum += (ulg)window[i];
}
num -= (4096 - start);
start = 4096;
}
for (i = start; i < start+num; i++) {
rsync_sum += (ulg)window[i];
rsync_sum -= (ulg)window[i - 4096];
if (rsync_chunk_end == 0xFFFFFFFFUL && ((rsync_sum) % 4096 == 0))
rsync_chunk_end = i;
}
}
| void rsync_roll(unsigned long a0, unsigned long a1) {
unsigned int v0;
unsigned int v1;
unsigned int v2;
unsigned long long v4;
unsigned long long v5;
v1 = a0;
v0 = a1;
if (v1 <= 4095) {
v2 = v1;
while (true) {
if (v2 <= 4095) {
v4 = v0 + v1;
if (v2 == v0 + v1)
break;
if (v2 != v0 + v1) {
rsync_sum = rsync_sum + *(v2 + &window);
v2 += 1;
}
} else {
v0 = v0 + v1 - 0x1000;
v1 = 0x1000;
break;
}
}
}
if (v2 > 4095 || v2 != v0 + v1 || v1 > 4095) {
v2 = v1;
while (true) {
v5 = v0 + v1;
if (v2 >= v0 + v1)
break;
rsync_sum = rsync_sum + *(v2 + &window);
rsync_sum = rsync_sum - *((v2 + 5238816));
if (rsync_chunk_end == 4294967295 && !(rsync_sum & 4095))
rsync_chunk_end = v2;
v2 += 1;
}
}
return;
}
|
int
auth_check_principals_line(char *cp, const struct sshkey_cert *cert,
const char *loc, struct sshauthopt **authoptsp)
{
u_int i, found = 0;
char *ep, *line_opts;
const char *reason =
((void *)0)
;
struct sshauthopt *opts =
((void *)0)
;
if (authoptsp !=
((void *)0)
)
*authoptsp =
((void *)0)
;
ep = cp + strlen(cp) - 1;
while (ep > cp && (*ep == '\n' || *ep == ' ' || *ep == '\t'))
*ep-- = '\0';
line_opts =
((void *)0)
;
if ((ep = strrchr(cp, ' ')) !=
((void *)0)
||
(ep = strrchr(cp, '\t')) !=
((void *)0)
) {
for (; *ep == ' ' || *ep == '\t'; ep++)
;
line_opts = cp;
cp = ep;
}
if ((opts = sshauthopt_parse(line_opts, &reason)) ==
((void *)0)
) {
sshlog("auth2-pubkeyfile.c", __func__, 202, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "%s: bad principals options: %s", loc, reason);
auth_debug_add("%s: bad principals options: %s", loc, reason);
return -1;
}
for (i = 0; i < cert->nprincipals; i++) {
if (strcmp(cp, cert->principals[i]) != 0)
continue;
sshlog("auth2-pubkeyfile.c", __func__, 210, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "%s: matched principal \"%.100s\"", loc, cert->principals[i])
;
found = 1;
}
if (found && authoptsp !=
((void *)0)
) {
*authoptsp = opts;
opts =
((void *)0)
;
}
sshauthopt_free(opts);
return found ? 0 : -1;
}
| int auth_check_principals_line(char *a0, struct_0 *a1, unsigned long long a2, unsigned long long *a3) {
unsigned long v0;
void* v1;
unsigned int v2;
unsigned int v3;
void* v4;
void* v5;
void* v6;
void* v7;
unsigned long v9;
v1 = a0;
v3 = 0;
v4 = 0;
v7 = 0;
if (a3)
*(a3) = 0;
v9 = v1 + strlen(v1) - 1;
v5 = v9;
while (true) {
if (v5 <= v1)
break;
switch (*(v5)) {
case 9: case 10: case 32:
v9 = v5;
v5 -= 1;
*(v9) = 0;
break;
default:
goto LABEL_4005a6;
}
}
LABEL_4005a6:
v6 = 0;
v5 = strrchr(v1, 0x20);
if (v5 || (v5 = strrchr(v1, 0x9), v5)) {
while (true) {
switch (*(v5)) {
case 9: case 32:
v5 += 1;
break;
default:
goto LABEL_400603;
}
}
LABEL_400603:
v6 = v1;
v1 = v5;
}
v7 = sshauthopt_parse(v6, &v4, &v4);
if (!v7) {
v0 = v4;
sshlog("auth2-pubkeyfile.c", "auth_check_principals_line", 0xca, 0x0, 0x5, 0x0, "%s: bad principals options: %s", a2);
auth_debug_add("%s: bad principals options: %s", a2, v4);
*(&v9) = -1;
return v9;
}
for (v2 = 0; v2 < a1->field_20; v2 += 1) {
if (!strcmp(v1, *((a1->field_28 + (v2 << 3))))) {
v0 = *((a1->field_28 + v2 * 8));
sshlog("auth2-pubkeyfile.c", "auth_check_principals_line", 0xd2, 0x0, 0x7, 0x0, "%s: matched principal \"%.100s\"", a2);
v3 = 1;
}
}
if (v3 && a3) {
*(a3) = v7;
v7 = 0;
}
sshauthopt_free(v7);
*(&v9) = (!v3 ? 0 : -1);
return v9;
}
|
int set_debug_flags(const char *flags) {
const char *pc = flags;
DebugFlags = 0;
while (*pc) {
const char **test;
int mask;
for (test = DebugFlagNames, mask = 1;
*test !=
((void *)0)
&& strcmp_until(*test, pc, ','); test++, mask <<= 1) ;
if (!*test) {
fprintf(
stderr
, "unrecognized debug flag <%s> <%s>\n", flags, pc);
return (0);
}
DebugFlags |= mask;
while (*pc && *pc != ',')
pc++;
if (*pc == ',')
pc++;
}
if (DebugFlags) {
int flag;
fprintf(
stderr
, "debug flags enabled:");
for (flag = 0; DebugFlagNames[flag]; flag++)
if (DebugFlags & (1 << flag))
fprintf(
stderr
, " %s", DebugFlagNames[flag]);
fprintf(
stderr
, "\n");
}
return (1);
}
| long long set_debug_flags(unsigned int a0) {
unsigned int v0;
unsigned int v1;
char *v2;
unsigned long long v3;
unsigned long long v5;
*(&v2) = a0;
DebugFlags = 0;
while (true) {
if (!*(v2)) {
if (DebugFlags) {
fprintf(*(&stderr), "debug flags enabled:");
for (v1 = 0; DebugFlagNames[v1]; v1 += 1) {
if (((DebugFlags >> (v1 & 31)) & 1))
fprintf(*(&stderr), " %s", DebugFlagNames[v1]);
}
fprintf(*(&stderr), "\n");
}
v5 = 1;
break;
} else {
v3 = &DebugFlagNames[0];
v0 = 1;
while (true) {
if (!*(v3))
break;
if (!strcmp_until(*(v3), v2, 0x2c))
break;
v3 += 8;
v0 *= 2;
}
if (*(v3)) {
DebugFlags = DebugFlags | v0;
while (true) {
if (!*(v2))
break;
if (*(v2) == 44)
break;
v2 += 1;
}
if (*(v2) == 44)
v2 += 1;
} else {
fprintf(*(&stderr), "unrecognized debug flag <%s> <%s>\n", a0, v2);
v5 = 0;
break;
}
}
}
return v5;
}
|
static void
bind_arrow_keys_internal (Keymap map)
{
Keymap xkeymap;
xkeymap = _rl_keymap;
_rl_keymap = map;
rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history);
rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history);
rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char);
rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char);
rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line);
rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line);
rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history);
rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history);
rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char);
rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char);
rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line);
rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
rl_bind_keyseq_if_unbound ("\033[1;5C", rl_forward_word);
rl_bind_keyseq_if_unbound ("\033[1;5D", rl_backward_word);
rl_bind_keyseq_if_unbound ("\033[3;5~", rl_kill_word);
rl_bind_keyseq_if_unbound ("\033[1;3C", rl_forward_word);
rl_bind_keyseq_if_unbound ("\033[1;3D", rl_backward_word);
_rl_keymap = xkeymap;
}
| void * bind_arrow_keys_internal(void *a1)
{
void *result;
void *v2;
v2 = rl_keymap;
rl_keymap = a1;
rl_bind_keyseq_if_unbound("\x1B[A", &rl_get_previous_history);
rl_bind_keyseq_if_unbound("\x1B[B", &rl_get_next_history);
rl_bind_keyseq_if_unbound("\x1B[C", &rl_forward_char);
rl_bind_keyseq_if_unbound("\x1B[D", &rl_backward_char);
rl_bind_keyseq_if_unbound("\x1B[H", &rl_beg_of_line);
rl_bind_keyseq_if_unbound("\x1B[F", &rl_end_of_line);
rl_bind_keyseq_if_unbound("\x1BOA", &rl_get_previous_history);
rl_bind_keyseq_if_unbound("\x1BOB", &rl_get_next_history);
rl_bind_keyseq_if_unbound("\x1BOC", &rl_forward_char);
rl_bind_keyseq_if_unbound("\x1BOD", &rl_backward_char);
rl_bind_keyseq_if_unbound("\x1BOH", &rl_beg_of_line);
rl_bind_keyseq_if_unbound("\x1BOF", &rl_end_of_line);
rl_bind_keyseq_if_unbound("\x1B[1;5C", &rl_forward_word);
rl_bind_keyseq_if_unbound("\x1B[1;5D", &rl_backward_word);
rl_bind_keyseq_if_unbound("\x1B[3;5~", &rl_kill_word);
rl_bind_keyseq_if_unbound("\x1B[1;3C", &rl_forward_word);
rl_bind_keyseq_if_unbound("\x1B[1;3D", &rl_backward_word);
result = v2;
rl_keymap = v2;
return result;
}
|
static int
revoke_by_hash(struct revoked_blob_tree *target, const u_char *p, size_t len)
{
u_char *blob;
int r;
if ((blob = malloc(len)) ==
((void *)0)
)
return -24;
memcpy(blob, p, len);
if ((r = revoke_blob(target, blob, len)) != 0) {
free(blob);
return r;
}
return 0;
}
| int revoke_by_hash(undefined8 param_1,void *param_2,size_t param_3)
{
int iVar1;
void *__dest;
__dest = malloc(param_3);
if (__dest == (void *)0x0) {
iVar1 = -0x18;
}
else {
memcpy(__dest,param_2,param_3);
iVar1 = revoke_blob(param_1,__dest,param_3);
if (iVar1 == 0) {
iVar1 = 0;
}
else {
free(__dest);
}
}
return iVar1;
}
|
void
dispose_word_desc (w)
WORD_DESC *w;
{
w->word = 0;
do { if ((wdcache).nc < (wdcache).cs) { do { if ((sizeof(WORD_DESC)) <= 32) { register char * mzp = (char *)((w)); unsigned long mctmp = (sizeof(WORD_DESC)); register long mcn; if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } switch (mctmp) { case 0: for(;;) { *mzp++ = 0xdf; case 7: *mzp++ = 0xdf; case 6: *mzp++ = 0xdf; case 5: *mzp++ = 0xdf; case 4: *mzp++ = 0xdf; case 3: *mzp++ = 0xdf; case 2: *mzp++ = 0xdf; case 1: *mzp++ = 0xdf; if(mcn <= 0) break; mcn--; } } } else memset (((w)), (0xdf), (sizeof(WORD_DESC))); } while(0); ((WORD_DESC **)((wdcache).data))[(wdcache).nc++] = (w); } else sh_xfree((w), "dispose_cmd.c", 259); } while (0);
}
| void dispose_word_desc(undefined8 *param_1)
{
undefined *puVar1;
long lVar2;
undefined8 *puVar3;
*param_1 = 0;
if (DAT_0010101c < wlcache) {
lVar2 = 1;
puVar3 = param_1;
while( true ) {
*(undefined *)puVar3 = 0xdf;
*(undefined *)((long)puVar3 + 1) = 0xdf;
*(undefined *)((long)puVar3 + 2) = 0xdf;
*(undefined *)((long)puVar3 + 3) = 0xdf;
*(undefined *)((long)puVar3 + 4) = 0xdf;
*(undefined *)((long)puVar3 + 5) = 0xdf;
puVar1 = (undefined *)((long)puVar3 + 7);
*(undefined *)((long)puVar3 + 6) = 0xdf;
puVar3 = puVar3 + 1;
*puVar1 = 0xdf;
if (lVar2 < 1) break;
lVar2 = lVar2 + -1;
}
lVar2 = (long)DAT_0010101c;
DAT_0010101c = DAT_0010101c + 1;
*(undefined8 **)(wdcache + lVar2 * 8) = param_1;
}
else {
sh_xfree(param_1,"dispose_cmd.c",0x103);
}
return;
}
|
static inline void
emit_mandatory_arg_note (void)
{
fputs_unlocked (gettext ("\nMandatory arguments to long options are mandatory for short options too.\n"),
stdout
)
;
}
| void emit_mandatory_arg_note() {
unsigned long long v1;
v1 = fputs_unlocked(gettext("\nMandatory arguments to long options are mandatory for short options too.\n"), stdout);
return;
}
|
struct sshbuf *
sshbuf_fromb(struct sshbuf *buf)
{
struct sshbuf *ret;
if (sshbuf_check_sanity(buf) != 0)
return
((void *)0)
;
if ((ret = sshbuf_from(sshbuf_ptr(buf), sshbuf_len(buf))) ==
((void *)0)
)
return
((void *)0)
;
if (sshbuf_set_parent(ret, buf) != 0) {
sshbuf_free(ret);
return
((void *)0)
;
}
return ret;
}
| long long sshbuf_fromb(void* a0) {
void* v0;
void* v2;
if (sshbuf_check_sanity(a0)) {
v2 = 0;
return v2;
}
v0 = sshbuf_from(sshbuf_ptr(a0), sshbuf_len(a0));
if (!v0) {
v2 = 0;
return v2;
} else if (sshbuf_set_parent(v0, a0)) {
sshbuf_free(v0);
v2 = 0;
return v2;
} else {
v2 = v0;
return v2;
}
}
|
static int
it_init_disabled (itp)
ITEMLIST *itp;
{
STRINGLIST *sl;
register int i, n;
sl = strlist_create (num_shell_builtins);
for (i = n = 0; i < num_shell_builtins; i++)
{
if (shell_builtins[i].function && ((shell_builtins[i].flags & 0x01) == 0))
sl->list[n++] = shell_builtins[i].name;
}
sl->list[sl->list_len = n] = (char *)
((void *)0)
;
itp->flags |= 0x020;
itp->slist = sl;
return 0;
}
| long long it_init_disabled(struct_2 *a0) {
struct_3 *v0;
int tmp_50;
int tmp_42;
void* v2;
void* v3;
v0 = strlist_create(num_shell_builtins);
v2 = 0;
for (v3 = 0; v3 < num_shell_builtins; v3 = v3 + 1) {
if (*((((v3 << 1) + v3 << 4) + shell_builtins + 8)) && !(*((((v3 << 1) + v3 << 4) + shell_builtins + 16)) & 1)) {
tmp_50 = v2;
v2 += 1;
v0->field_0[tmp_50].field_0 = *((shell_builtins + v3 * 48));
}
}
tmp_42 = v0->field_0;
v0->field_c = v2;
*((v0->field_c * 8 + tmp_42)) = 0;
a0->field_0 = a0->field_0 | 32;
a0->field_10 = v0;
return 0;
}
|
static int
tilde_find_suffix (const char *string)
{
register int i, j, string_len;
register char **suffixes;
suffixes = tilde_additional_suffixes;
string_len = strlen (string);
for (i = 0; i < string_len; i++)
{
if (string[i] == '/' )
break;
for (j = 0; suffixes && suffixes[j]; j++)
{
if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0)
return (i);
}
}
return (i);
}
| int tilde_find_suffix(unsigned long long a0) {
unsigned long long v2;
void* v3;
unsigned int v4;
v2 = 0;
while (true) {
if (v2 >= strlen(a0)) {
LABEL_4001c8:
v4 = v2;
break;
} else {
if (*((a0 + v2)) == 47)
goto LABEL_4001c8;
v3 = 0;
while (true) {
if (!tilde_additional_suffixes) {
LABEL_4001bd:
v2 = 1;
break;
} else {
if (!*(((v3 << 3) + tilde_additional_suffixes)))
goto LABEL_4001bd;
if (strncmp(a0, *(((v3 << 3) + tilde_additional_suffixes)), strlen(*(((v3 << 3) + tilde_additional_suffixes))))) {
v3 = v3 + 1;
} else {
v4 = 0;
goto LABEL_4001ca;
}
}
}
}
}
LABEL_4001ca:
return v4;
}
|
static
_Bool
different (char *old, char *new, size_t oldlen, size_t newlen)
{
if (check_chars < oldlen)
oldlen = check_chars;
if (check_chars < newlen)
newlen = check_chars;
if (ignore_case)
return oldlen != newlen || memcasecmp (old, new, oldlen);
else
return oldlen != newlen || memcmp (old, new, oldlen);
}
| int different(void* a0, void* a1, unsigned long a2, unsigned long a3) {
unsigned long v0;
unsigned long v1;
unsigned int v3;
unsigned int v4;
unsigned int v5;
v1 = a2;
v0 = a3;
if (v1 > check_chars)
v1 = check_chars;
if (v0 > check_chars)
v0 = check_chars;
if (ignore_case) {
if (v1 != v0 || memcasecmp(a0, a1, v1, a1))
v4 = 1;
else
v4 = 0;
v5 = v4 & 1;
return v5;
} else {
if (v1 != v0 || memcmp(a0, a1, v1))
v3 = 1;
else
v3 = 0;
v5 = v3 & 1;
return v5;
}
}
|
static void vti_print_help(struct link_util *lu, int argc, char **argv, FILE *f)
{
fprintf(f,
"Usage: ... %-4s [ remote ADDR ]\n"
" [ local ADDR ]\n"
" [ [i|o]key KEY ]\n"
" [ dev PHYS_DEV ]\n"
" [ fwmark MARK ]\n"
"\n"
"Where: ADDR := { IP_ADDRESS }\n"
" KEY := { DOTTED_QUAD | NUMBER }\n"
" MARK := { 0x0..0xffffffff }\n",
lu->id);
}
| void vti_print_help(unsigned long a0, unsigned long a1, unsigned long a2, void* a3) {
unsigned long v0;
unsigned int v1;
unsigned long v2;
unsigned long long v4;
v2 = a0;
v1 = a1;
v0 = a2;
v4 = fprintf(a3, "Usage: ... %-4s\t[ remote ADDR ]\n\t\t[ local ADDR ]\n\t\t[ [i|o]key KEY ]\n\t\t[ dev PHYS_DEV ]\n\t\t[ fwmark MARK ]\n\nWhere:\tADDR := { IP_ADDRESS }\n\tKEY := { DOTTED_QUAD | NUMBER }\n\tMARK := { 0x0..0xffffffff }\n");
return;
}
|
static char *
pos_params (string, start, end, quoted, pflags)
char *string;
int start, end, quoted, pflags;
{
WORD_LIST *save, *params, *h, *t;
char *ret;
int i;
if (start == end)
return ((char *)
((void *)0)
);
save = params = list_rest_of_args ();
if (save == 0 && start > 0)
return ((char *)
((void *)0)
);
if (start == 0)
{
t = make_word_list (make_word (dollar_vars[0]), params);
save = params = t;
}
for (i = start ? 1 : 0; params && i < start; i++)
params = params->next;
if (params == 0)
{
dispose_words (save);
return ((char *)
((void *)0)
);
}
for (h = t = params; params && i < end; i++)
{
t = params;
params = params->next;
}
t->next = (WORD_LIST *)
((void *)0)
;
ret = string_list_pos_params (string[0], h, quoted, pflags);
if (t != params)
t->next = params;
dispose_words (save);
return (ret);
}
| int pos_params(char *a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long long a4, unsigned long long a5) {
unsigned int v0;
unsigned long long *v1;
unsigned long long *v2;
unsigned long long *v3;
unsigned long long *v4;
unsigned long v5;
unsigned int v7;
if (a1 == a2) {
v7 = 0;
return v7;
}
v2 = list_rest_of_args();
v1 = v2;
if (!v1 && a1 > 0) {
v7 = 0;
return v7;
}
if (!a1) {
v7 = make_word(dollar_vars);
v3 = make_word_list(v7, v2, v7);
v2 = v3;
v1 = v2;
}
for (v0 = a1; v2 && v0 < a1; v0 += 1) {
v2 = *(v2);
}
if (!v2) {
dispose_words(v1);
v7 = 0;
return v7;
}
v3 = v2;
for (v4 = v3; v2 && v0 < a2; v0 += 1) {
v3 = v2;
v2 = *(v2);
}
*(v3) = 0;
v5 = string_list_pos_params(*(a0), v4, a3, a4, a4, a5);
if (v3 != v2)
*(v3) = v2;
dispose_words(v1);
v7 = v5;
return v7;
}
|
static void
push_current_dired_pos (struct obstack *obs)
{
if (dired)
__extension__ ({ struct obstack *__o = (obs); size_t __len = (sizeof dired_pos); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < __len) _obstack_newchunk (__o, __len); memcpy (__o->next_free, &dired_pos, __len); __o->next_free += __len; (void) 0; });
}
| void push_current_dired_pos(unsigned long long a0[5]) {
unsigned long long v0;
unsigned long long v1[5];
unsigned long long v3;
struct_0 *v4;
v3 = dired;
if (dired) {
v0 = 8;
v1[0] = a0;
if (v1[4] - v1[3] < v0)
_obstack_newchunk(a0, v0, v0);
memcpy(a0[3], &dired_pos, v0);
v4 = a0;
a0[3] = a0[3] + v0;
}
return;
}
|
static void usage(void)
{
if (do_link)
iplink_usage();
fprintf(
stderr
,
"Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n"
" [ CONFFLAG-LIST ]\n"
" ip address del IFADDR dev IFNAME [mngtmpaddr]\n"
" ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n"
" [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n"
" ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ]\n"
" [ nomaster ]\n"
" [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ]\n"
" [ label LABEL ] [up] [ vrf NAME ] ]\n"
" ip address {showdump|restore}\n"
"IFADDR := PREFIX | ADDR peer PREFIX\n"
" [ broadcast ADDR ] [ anycast ADDR ]\n"
" [ label IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ]\n"
"SCOPE-ID := [ host | link | global | NUMBER ]\n"
"FLAG-LIST := [ FLAG-LIST ] FLAG\n"
"FLAG := [ permanent | dynamic | secondary | primary |\n"
" [-]tentative | [-]deprecated | [-]dadfailed | temporary |\n"
" CONFFLAG-LIST ]\n"
"CONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n"
"CONFFLAG := [ home | nodad | mngtmpaddr | noprefixroute | autojoin ]\n"
"LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT ]\n"
"LFT := forever | SECONDS\n");
iplink_types_usage();
exit(-1);
}
| void usage() {
unsigned long long v1;
unsigned long long v2;
unsigned long long v3;
unsigned long long v4;
unsigned long long v5;
if (do_link)
iplink_usage();
fprintf(stderr, "Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n [ CONFFLAG-LIST ]\n ip address del IFADDR dev IFNAME [mngtmpaddr]\n ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ]\n [ nomaster ]\n [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ]\n [ label LABEL ] [up] [ vrf NAME ] ]\n ip address {showdump|restore}\nIFADDR := PREFIX | ADDR peer PREFIX\n [ broadcast ADDR ] [ anycast ADDR ]\n [ label IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ]\nSCOPE-ID := [ host | link | global | NUMBER ]\nFLAG-LIST := [ FLAG-LIST ] FLAG\nFLAG := [ permanent | dynamic | secondary | primary |\n [-]tentative | [-]deprecated | [-]dadfailed | temporary |\n CONFFLAG-LIST ]\nCONFFLAG-LIST := [ CONFFLAG-LIST");
iplink_types_usage(v1, "Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ]\n [ CONFFLAG-LIST ]\n ip address del IFADDR dev IFNAME [mngtmpaddr]\n ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ]\n [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up]\n ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ]\n [ nomaster ]\n [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ]\n [ label LABEL ] [up] [ vrf NAME ] ]\n ip address {showdump|restore}\nIFADDR := PREFIX | ADDR peer PREFIX\n [ broadcast ADDR ] [ anycast ADDR ]\n [ label IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ]\nSCOPE-ID := [ host | link | global | NUMBER ]\nFLAG-LIST := [ FLAG-LIST ] FLAG\nFLAG := [ permanent | dynamic | secondary | primary |\n [-]tentative | [-]deprecated | [-]dadfailed | temporary |\n CONFFLAG-LIST ]\nCONFFLAG-LIST := [ CONFFLAG-LIST", v2, v3, v4, v5);
exit(0xffffffff);
}
|
void
dpkg_selabel_set_context(const char *matchpath, const char *path, mode_t mode)
{
char *scontext =
((void *)0)
;
int ret;
if (sehandle ==
((void *)0)
)
return;
ret = selabel_lookup_raw(sehandle, &scontext, matchpath, mode &
0170000
);
if (ret == -1 || (ret == 0 && scontext ==
((void *)0)
))
return;
ret = lsetfilecon_raw(path, scontext);
if (ret < 0 &&
(*__errno_location ())
!=
95
)
ohshite(gettext("cannot set security context for file object '%s'"),
path);
freecon(scontext);
}
| unsigned long dpkg_selabel_set_context(long a1, long a2, unsigned short a3)
{
long v3;
char *v4;
int v7;
long v8;
unsigned long v9;
v9 = __readfsqword(0x28u);
v8 = 0LL;
if ( sehandle )
{
v7 = selabel_lookup_raw(sehandle, &v8, a1, a3 & 0xF000);
if ( v7 != -1 && (v7 || v8) )
{
v3 = v8;
if ( (int)lsetfilecon_raw(a2, v8) < 0 && *_errno_location() != 95 )
{
v4 = gettext("cannot set security context for file object '%s'");
v3 = a2;
ohshite(v4);
}
freecon(v8, v3);
}
}
return __readfsqword(0x28u) ^ v9;
}
|
int
rl_set_timeout (unsigned int secs, unsigned int usecs)
{
timeout_duration.tv_sec = secs + usecs / 1000000;
timeout_duration.tv_usec = usecs % 1000000;
return 0;
}
| long rl_set_timeout(int a1, unsigned int a2)
{
timeout_duration = a2 / 0xF4240 + a1;
qword_1578 = a2 % 0xF4240;
return 0LL;
}
|
static rsRetVal
sigprovPrepare(instanceData *__restrict__ const pData, uchar *__restrict__ const fn)
{
rsRetVal iRet = RS_RET_OK;
pData->sigprov.OnFileOpen(pData->sigprovData, fn, &pData->sigprovFileData);
return iRet;
}
| undefined4 sigprovPrepare(long param_1,undefined8 param_2)
{
(**(code **)(param_1 + 0xa0))(*(undefined8 *)(param_1 + 0xb8),param_2,param_1 + 0xc0);
return 0;
}
|
static
void makeMaps_e ( EState* s )
{
Int32 i;
s->nInUse = 0;
for (i = 0; i < 256; i++)
if (s->inUse[i]) {
s->unseqToSeq[i] = s->nInUse;
s->nInUse++;
}
}
| void makeMaps_e(long param_1)
{
int local_c;
*(undefined4 *)(param_1 + 0x7c) = 0;
for (local_c = 0; local_c < 0x100; local_c = local_c + 1) {
if (*(char *)(param_1 + 0x80 + (long)local_c) != '\0') {
*(char *)(param_1 + 0x180 + (long)local_c) = (char)*(undefined4 *)(param_1 + 0x7c);
*(int *)(param_1 + 0x7c) = *(int *)(param_1 + 0x7c) + 1;
}
}
return;
}
|
void
setup_history_ignore (varname)
char *varname;
{
setup_ignore_patterns (&histignore);
}
| long setup_history_ignore()
{
return setup_ignore_patterns(&histignore);
}
|
static void print_encap_ip(FILE *fp, struct rtattr *encap)
{
struct rtattr *tb[(__LWTUNNEL_IP_MAX - 1)+1];
__u16 flags;
(parse_rtattr_flags((tb), ((__LWTUNNEL_IP_MAX - 1)), ((void*)(((char*)(encap)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((encap)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), (1 << 15)));
if (tb[LWTUNNEL_IP_ID])
print_u64(PRINT_ANY, "id", "id %llu ",
((1==ntohl(1)) ? (rta_getattr_u64(tb[LWTUNNEL_IP_ID])) : ((uint64_t)ntohl((rta_getattr_u64(tb[LWTUNNEL_IP_ID])) & 0xFFFFFFFF) << 32) | ntohl((rta_getattr_u64(tb[LWTUNNEL_IP_ID])) >> 32)));
if (tb[LWTUNNEL_IP_SRC])
print_color_string(PRINT_ANY, COLOR_INET,
"src", "src %s ",
rt_addr_n2a(
2
, ((int)((tb[LWTUNNEL_IP_SRC])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), ((void*)(((char*)(tb[LWTUNNEL_IP_SRC])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))))));
if (tb[LWTUNNEL_IP_DST])
print_color_string(PRINT_ANY, COLOR_INET,
"dst", "dst %s ",
rt_addr_n2a(
2
, ((int)((tb[LWTUNNEL_IP_DST])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), ((void*)(((char*)(tb[LWTUNNEL_IP_DST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))))));
if (tb[LWTUNNEL_IP_TTL])
print_uint(PRINT_ANY, "ttl",
"ttl %u ", rta_getattr_u8(tb[LWTUNNEL_IP_TTL]));
if (tb[LWTUNNEL_IP_TOS])
print_uint(PRINT_ANY, "tos",
"tos %d ", rta_getattr_u8(tb[LWTUNNEL_IP_TOS]));
if (tb[LWTUNNEL_IP_FLAGS]) {
flags = rta_getattr_u16(tb[LWTUNNEL_IP_FLAGS]);
if (flags &
((__be16)(__builtin_constant_p((__u16)((
0x04
))) ? ((__u16)( (((__u16)((
0x04
)) & (__u16)0x00ffU) << 8) | (((__u16)((
0x04
)) & (__u16)0xff00U) >> 8))) : __fswab16((
0x04
))))
)
print_bool(PRINT_ANY, "key", "key ",
1
);
if (flags &
((__be16)(__builtin_constant_p((__u16)((
0x01
))) ? ((__u16)( (((__u16)((
0x01
)) & (__u16)0x00ffU) << 8) | (((__u16)((
0x01
)) & (__u16)0xff00U) >> 8))) : __fswab16((
0x01
))))
)
print_bool(PRINT_ANY, "csum", "csum ",
1
);
if (flags &
((__be16)(__builtin_constant_p((__u16)((
0x08
))) ? ((__u16)( (((__u16)((
0x08
)) & (__u16)0x00ffU) << 8) | (((__u16)((
0x08
)) & (__u16)0xff00U) >> 8))) : __fswab16((
0x08
))))
)
print_bool(PRINT_ANY, "seq", "seq ",
1
);
}
if (tb[LWTUNNEL_IP_OPTS])
lwtunnel_print_opts(tb[LWTUNNEL_IP_OPTS]);
}
| void print_encap_ip(undefined8 param_1,ushort *param_2)
{
undefined uVar1;
ushort uVar2;
uint32_t uVar3;
uint32_t uVar4;
undefined8 uVar5;
uint32_t __netlong;
undefined8 in_R9;
long in_FS_OFFSET;
undefined local_68 [8];
long local_60;
ushort *local_58;
ushort *local_50;
long local_48;
long local_40;
long local_38;
long local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
parse_rtattr_flags(local_68,8,param_2 + 2,*param_2 - 4,0x8000,in_R9,param_2,param_1);
if (local_60 != 0) {
uVar3 = ntohl(1);
if (uVar3 == 1) {
uVar5 = rta_getattr_u64(local_60);
}
else {
uVar3 = rta_getattr_u64();
uVar3 = ntohl(uVar3);
rta_getattr_u64();
uVar4 = ntohl(__netlong);
uVar5 = CONCAT44(uVar3,uVar4);
}
print_u64(4,&DAT_00106f80,"id %llu ",uVar5);
}
if (local_50 != (ushort *)0x0) {
uVar5 = rt_addr_n2a(2,*local_50 - 4,local_50 + 2);
print_color_string(4,2,&DAT_00106f8b,"src %s ",uVar5);
}
if (local_58 != (ushort *)0x0) {
uVar5 = rt_addr_n2a(2,*local_58 - 4,local_58 + 2);
print_color_string(4,2,&DAT_00106f03,"dst %s ",uVar5);
}
if (local_48 != 0) {
uVar1 = rta_getattr_u8(local_48);
print_uint(4,&DAT_00106f0f,"ttl %u ",uVar1);
}
if (local_40 != 0) {
uVar1 = rta_getattr_u8(local_40);
print_uint(4,&DAT_00106f9f,"tos %d ",uVar1);
}
if (local_38 != 0) {
uVar2 = rta_getattr_u16(local_38);
if ((uVar2 & 0x400) != 0) {
print_bool(4,&DAT_00106fa8,&DAT_00106fa3,1);
}
if ((uVar2 & 0x100) != 0) {
print_bool(4,&DAT_00106fb2,"csum ",1);
}
if ((uVar2 & 0x800) != 0) {
print_bool(4,&DAT_00106fbc,&DAT_00106fb7,1);
}
}
if (local_28 != 0) {
lwtunnel_print_opts(local_28);
}
if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return;
}
|
static inline void
emit_ancillary_info (char const *program)
{
struct infomap { char const *program; char const *node; } const infomap[] = {
{ "[", "test invocation" },
{ "coreutils", "Multi-call invocation" },
{ "sha224sum", "sha2 utilities" },
{ "sha256sum", "sha2 utilities" },
{ "sha384sum", "sha2 utilities" },
{ "sha512sum", "sha2 utilities" },
{
((void *)0)
,
((void *)0)
}
};
char const *node = program;
struct infomap const *map_prog = infomap;
while (map_prog->program && ! (strcmp (program, map_prog->program) == 0))
map_prog++;
if (map_prog->node)
node = map_prog->node;
printf (gettext ("\n%s online help: <%s>\n"), "GNU coreutils", "https:
char const *lc_messages = setlocale (
5
,
((void *)0)
);
if (lc_messages && strncmp (lc_messages, "" "en_" "", sizeof ("en_") - 1))
{
fputs_unlocked (gettext ("Report any translation bugs to " "<https:
stdout
)
;
}
char const *url_program = (strcmp (program, "[") == 0) ? "test" : program;
printf (gettext ("Full documentation <%s%s>\n"),
"https:
printf (gettext ("or available locally via: info '(coreutils) %s%s'\n"),
node, node == program ? " invocation" : "");
}
| unsigned long emit_ancillary_info(const char *a1)
{
char *v1;
FILE *v2;
char *v3;
const char *v4;
char *v5;
const char *v6;
char *v7;
const char *v9;
long *i;
const char *v11;
const char *v12;
long v13[15];
unsigned long v14;
v14 = __readfsqword(0x28u);
v13[0] = (long)"[";
v13[1] = (long)"test invocation";
v13[2] = (long)"coreutils";
v13[3] = (long)"Multi-call invocation";
v13[4] = (long)"sha224sum";
v13[5] = (long)"sha2 utilities";
v13[6] = (long)"sha256sum";
v13[7] = (long)"sha2 utilities";
v13[8] = (long)"sha384sum";
v13[9] = (long)"sha2 utilities";
v13[10] = (long)"sha512sum";
v13[11] = (long)"sha2 utilities";
v13[12] = 0LL;
v13[13] = 0LL;
v9 = a1;
for ( i = v13; *i && strcmp(a1, (const char *)*i); i += 2 )
;
if ( i[1] )
v9 = (const char *)i[1];
v1 = gettext("\n%s online help: <%s>\n");
printf(v1, "GNU coreutils", "https:
v11 = setlocale(5, 0LL);
if ( v11 && strncmp(v11, "en_", 3uLL) )
{
v2 = stdout;
v3 = gettext("Report any translation bugs to <https:
fputs_unlocked(v3, v2);
}
if ( !strcmp(a1, "[") )
v4 = "test";
else
v4 = a1;
v12 = v4;
v5 = gettext("Full documentation <%s%s>\n");
printf(v5, "https:
if ( v9 == a1 )
v6 = " invocation";
else
v6 = locale;
v7 = gettext("or available locally via: info '(coreutils) %s%s'\n");
printf(v7, v9, v6);
return __readfsqword(0x28u) ^ v14;
}
|
static void
outputPageFooter(char *l, char *c, char *r)
{
out_html("<HR>\n");
outputPageHeader(l, c, r);
}
| void outputPageFooter(char *a1, char *a2, char *a3)
{
out_html("<HR>\n");
outputPageHeader(a1, a2, a3);
}
|
static int check_directory(e2fsck_t ctx, ext2_ino_t dir,
struct problem_context *pctx)
{
ext2_filsys fs = ctx->fs;
ext2_ino_t ino = dir, parent;
int loop_pass = 0, parent_count = 0;
while (1) {
if (ext2fs_mark_inode_bitmap2(inode_done_map, ino))
break;
if (e2fsck_dir_info_get_parent(ctx, ino, &parent)) {
fix_problem(ctx, 0x030016, pctx);
return 0;
}
if (!parent ||
(loop_pass &&
(ext2fs_test_inode_bitmap2(inode_loop_detect,
parent)))) {
pctx->ino = ino;
if (fix_problem(ctx, 0x030003, pctx)) {
if (e2fsck_reconnect_file(ctx, pctx->ino))
ext2fs_unmark_valid(fs);
else {
fix_dotdot(ctx, pctx->ino,
ctx->lost_and_found);
parent = ctx->lost_and_found;
}
}
break;
}
ino = parent;
if (loop_pass) {
ext2fs_mark_inode_bitmap2(inode_loop_detect, ino);
} else if (parent_count++ > 2048) {
loop_pass = 1;
if (inode_loop_detect)
ext2fs_clear_inode_bitmap(inode_loop_detect);
else {
pctx->errcode = e2fsck_allocate_inode_bitmap(fs, (gettext ("inode loop detection bitmap")), 3, "inode_loop_detect", &inode_loop_detect);
if (pctx->errcode) {
pctx->num = 1;
fix_problem(ctx,
0x030011, pctx);
ctx->flags |= 0x0001;
return -1;
}
}
ino = dir;
}
}
pctx->ino = dir;
if (e2fsck_dir_info_get_dotdot(ctx, dir, &pctx->ino2) ||
e2fsck_dir_info_get_parent(ctx, dir, &pctx->dir)) {
fix_problem(ctx, 0x030016, pctx);
return 0;
}
if (pctx->ino2 != pctx->dir) {
if (fix_problem(ctx, 0x030005, pctx))
fix_dotdot(ctx, dir, pctx->dir);
}
return 0;
}
| undefined8 check_directory(undefined8 *param_1,int param_2,long *param_3)
{
int iVar1;
bool bVar2;
int iVar3;
undefined8 uVar4;
long lVar5;
long in_FS_OFFSET;
int local_28;
int local_24;
int local_20;
int local_1c;
undefined8 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_18 = *param_1;
local_20 = 0;
local_1c = 0;
iVar3 = param_2;
LAB_00100aaf:
do {
local_24 = iVar3;
iVar3 = ext2fs_mark_inode_bitmap2(inode_done_map,local_24);
if (iVar3 != 0) {
LAB_00100c9d:
*(int *)(param_3 + 1) = param_2;
iVar3 = e2fsck_dir_info_get_dotdot(param_1,param_2,(long)param_3 + 0xc);
if ((iVar3 == 0) &&
(iVar3 = e2fsck_dir_info_get_parent(param_1,param_2,param_3 + 2), iVar3 == 0)) {
if ((*(int *)((long)param_3 + 0xc) != *(int *)(param_3 + 2)) &&
(iVar3 = fix_problem(param_1,0x30005,param_3), iVar3 != 0)) {
fix_dotdot(param_1,param_2,*(undefined4 *)(param_3 + 2));
}
uVar4 = 0;
}
else {
fix_problem(param_1,0x30016,param_3);
uVar4 = 0;
}
goto LAB_00100d45;
}
iVar3 = e2fsck_dir_info_get_parent(param_1,local_24,&local_28);
if (iVar3 != 0) {
fix_problem(param_1,0x30016,param_3);
uVar4 = 0;
goto LAB_00100d45;
}
if ((local_28 == 0) ||
((local_20 != 0 && (iVar3 = ext2fs_test_inode_bitmap2(inode_loop_detect), iVar3 != 0)))) {
*(int *)(param_3 + 1) = local_24;
iVar3 = fix_problem(param_1,0x30003,param_3);
if (iVar3 != 0) {
iVar3 = e2fsck_reconnect_file(param_1,*(undefined4 *)(param_3 + 1));
if (iVar3 == 0) {
fix_dotdot(param_1,*(undefined4 *)(param_3 + 1),*(undefined4 *)(param_1 + 0x45));
local_28 = *(int *)(param_1 + 0x45);
}
else {
ext2fs_unmark_valid(local_18);
}
}
goto LAB_00100c9d;
}
local_24 = local_28;
if (local_20 == 0) break;
ext2fs_mark_inode_bitmap2(inode_loop_detect,local_28);
iVar3 = local_24;
} while( true );
iVar1 = local_1c + 1;
bVar2 = 0x800 < local_1c;
iVar3 = local_24;
local_1c = iVar1;
if (bVar2) {
local_20 = 1;
if (inode_loop_detect == 0) {
uVar4 = gettext("inode loop detection bitmap");
lVar5 = e2fsck_allocate_inode_bitmap(local_18,uVar4,3,"inode_loop_detect",&inode_loop_detect);
*param_3 = lVar5;
iVar3 = param_2;
if (*param_3 != 0) {
param_3[10] = 1;
fix_problem(param_1,0x30011,param_3);
*(uint *)(param_1 + 9) = *(uint *)(param_1 + 9) | 1;
uVar4 = 0xffffffff;
LAB_00100d45:
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return uVar4;
}
__stack_chk_fail();
}
}
else {
ext2fs_clear_inode_bitmap(inode_loop_detect);
iVar3 = param_2;
}
}
goto LAB_00100aaf;
}
|
static void
siginfo_handler (int sig)
{
if (!
1
)
signal (sig, siginfo_handler);
info_signal_count++;
}
| long long siginfo_handler(unsigned long a0) {
unsigned int v0;
unsigned long long v2;
v0 = a0;
v2 = info_signal_count + 1;
info_signal_count = info_signal_count + 1;
return v2;
}
|
static struct stat *
get_outstatus (void)
{
static int outstat_errno;
static struct stat outstat;
if (outstat_errno == 0)
outstat_errno = fstat (
1
, &outstat) == 0 ? -1 :
(*__errno_location ())
;
return outstat_errno < 0 ? &outstat :
((void *)0)
;
}
| struct stat *get_outstatus()
{
int v0;
if ( !outstat_errno_7515 )
{
if ( fstat(1, &outstat_7516) )
v0 = *_errno_location();
else
v0 = -1;
outstat_errno_7515 = v0;
}
if ( outstat_errno_7515 >= 0 )
return 0LL;
else
return &outstat_7516;
}
|
static
_Bool
wc (int fd, char const *file_x, struct fstatus *fstatus, off_t current_pos)
{
_Bool
ok =
1
;
char buf[(16 * 1024) + 1];
size_t bytes_read;
uintmax_t lines, words, chars, bytes, linelength;
_Bool
count_bytes, count_chars, count_complicated;
char const *file = file_x ? file_x : gettext ("standard input");
lines = words = chars = bytes = linelength = 0;
if (
(__ctype_get_mb_cur_max ())
> 1)
{
count_bytes = print_bytes;
count_chars = print_chars;
}
else
{
count_bytes = print_bytes || print_chars;
count_chars =
0
;
}
count_complicated = print_words || print_linelength;
if (!count_bytes || count_chars || print_lines || count_complicated)
fdadvise (fd, 0, 0, FADVISE_SEQUENTIAL);
if (count_bytes && !count_chars && !print_lines && !count_complicated)
{
_Bool
skip_read =
0
;
if (0 < fstatus->failed)
fstatus->failed = fstat (fd, &fstatus->st);
if (! fstatus->failed && usable_st_size (&fstatus->st)
&& 0 <= fstatus->st.st_size)
{
size_t end_pos = fstatus->st.st_size;
if (current_pos < 0)
current_pos = lseek (fd, 0,
1
);
if (end_pos % page_size)
{
bytes = end_pos < current_pos ? 0 : end_pos - current_pos;
skip_read =
1
;
}
else
{
off_t hi_pos = end_pos - end_pos % (((0 < (fstatus->st).st_blksize && (fstatus->st).st_blksize <= ((size_t)-1) / 8 + 1) ? (fstatus->st).st_blksize :
512
) + 1);
if (0 <= current_pos && current_pos < hi_pos
&& 0 <= lseek (fd, hi_pos,
1
))
bytes = hi_pos - current_pos;
}
}
if (! skip_read)
{
fdadvise (fd, 0, 0, FADVISE_SEQUENTIAL);
while ((bytes_read = safe_read (fd, buf, (16 * 1024))) > 0)
{
if (bytes_read == ((size_t) -1))
{
error (0,
(*__errno_location ())
, "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, file));
ok =
0
;
break;
}
bytes += bytes_read;
}
}
}
else if (!count_chars && !count_complicated)
{
if (avx2_supported ())
wc_lines_p = wc_lines_avx2;
ok = wc_lines_p (file, fd, &lines, &bytes);
}
else if (
(__ctype_get_mb_cur_max ())
> 1)
{
_Bool
in_word =
0
;
uintmax_t linepos = 0;
mbstate_t state = { 0, };
_Bool
in_shift =
0
;
size_t prev = 0;
while ((bytes_read = safe_read (fd, buf + prev, (16 * 1024) - prev)) > 0)
{
char const *p;
mbstate_t backup_state;
if (bytes_read == ((size_t) -1))
{
error (0,
(*__errno_location ())
, "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, file));
ok =
0
;
break;
}
bytes += bytes_read;
p = buf;
bytes_read += prev;
do
{
wchar_t wide_char;
size_t n;
_Bool
wide =
1
;
if (!in_shift && is_basic (*p))
{
n = 1;
wide_char = *p;
wide =
0
;
}
else
{
in_shift =
1
;
backup_state = state;
n =
rpl_mbrtowc
(&wide_char, p, bytes_read, &state);
if (n == (size_t) -2)
{
state = backup_state;
break;
}
if (n == (size_t) -1)
{
p++;
bytes_read--;
continue;
}
if (mbsinit (&state))
in_shift =
0
;
if (n == 0)
{
wide_char = 0;
n = 1;
}
}
switch (wide_char)
{
case '\n':
lines++;
__attribute__ ((__fallthrough__));
case '\r':
case '\f':
if (linepos > linelength)
linelength = linepos;
linepos = 0;
goto mb_word_separator;
case '\t':
linepos += 8 - (linepos % 8);
goto mb_word_separator;
case ' ':
linepos++;
__attribute__ ((__fallthrough__));
case '\v':
mb_word_separator:
words += in_word;
in_word =
0
;
break;
default:
if (wide && iswprint (wide_char))
{
if (print_linelength)
{
int width = wcwidth (wide_char);
if (width > 0)
linepos += width;
}
if (iswspace (wide_char) || iswnbspace (wide_char))
goto mb_word_separator;
in_word =
1
;
}
else if (!wide &&
((*__ctype_b_loc ())[(int) ((
to_uchar (*p)
))] & (unsigned short int) _ISprint)
)
{
linepos++;
if (
((*__ctype_b_loc ())[(int) ((
to_uchar (*p)
))] & (unsigned short int) _ISspace)
)
goto mb_word_separator;
in_word =
1
;
}
break;
}
p += n;
bytes_read -= n;
chars++;
}
while (bytes_read > 0);
if (bytes_read > 0)
{
if (bytes_read == (16 * 1024))
{
p++;
bytes_read--;
}
memmove (buf, p, bytes_read);
}
prev = bytes_read;
}
if (linepos > linelength)
linelength = linepos;
words += in_word;
}
else
{
_Bool
in_word =
0
;
uintmax_t linepos = 0;
while ((bytes_read = safe_read (fd, buf, (16 * 1024))) > 0)
{
char const *p = buf;
if (bytes_read == ((size_t) -1))
{
error (0,
(*__errno_location ())
, "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, file));
ok =
0
;
break;
}
bytes += bytes_read;
do
{
switch (*p++)
{
case '\n':
lines++;
__attribute__ ((__fallthrough__));
case '\r':
case '\f':
if (linepos > linelength)
linelength = linepos;
linepos = 0;
goto word_separator;
case '\t':
linepos += 8 - (linepos % 8);
goto word_separator;
case ' ':
linepos++;
__attribute__ ((__fallthrough__));
case '\v':
word_separator:
words += in_word;
in_word =
0
;
break;
default:
if (
((*__ctype_b_loc ())[(int) ((
to_uchar (p[-1])
))] & (unsigned short int) _ISprint)
)
{
linepos++;
if (
((*__ctype_b_loc ())[(int) ((
to_uchar (p[-1])
))] & (unsigned short int) _ISspace)
|| isnbspace (to_uchar (p[-1])))
goto word_separator;
in_word =
1
;
}
break;
}
}
while (--bytes_read);
}
if (linepos > linelength)
linelength = linepos;
words += in_word;
}
if (count_chars < print_chars)
chars = bytes;
write_counts (lines, words, chars, bytes, linelength, file_x);
total_lines += lines;
total_words += words;
total_chars += chars;
total_bytes += bytes;
if (linelength > max_line_length)
max_line_length = linelength;
return ok;
}
| int wc() {
unsigned long v0;
int tmp_12;
char v1;
char v2;
char v3;
char v4;
char v5;
char v6;
char v7;
char v8;
char v9;
unsigned int v10;
unsigned int v11;
void* v12;
void* v13;
unsigned long v14;
void* v15;
void* v16;
void* v17;
unsigned long v18;
void* v19;
char *v20;
unsigned long long v21;
void* v22;
char *v23;
unsigned long long v24;
unsigned long v25;
unsigned int v26;
void* v27;
void* v28;
char v29;
char v30;
char v31;
unsigned long v32;
unsigned long v33;
char v35;
char v36;
unsigned long v37;
unsigned long v38;
unsigned long long *v39;
char *v40;
char *v41;
char v42;
struct_0 *v43;
unsigned long long v44;
struct_1 *v47;
unsigned long long v50;
unsigned long long v51;
unsigned long long v56;
unsigned long long v57;
unsigned long long v58;
unsigned long long v59;
void* v60;
unsigned long long v61;
unsigned long long v62;
unsigned long long v63;
unsigned long long v64;
unsigned long long v65;
unsigned long long v66;
v33 = v37;
do {
v31 = *(&v31);
} while (&v31 != &v30);
v0 = v38;
v32 = v39[5];
v1 = 1;
if (!v40)
v41 = gettext("standard input");
else
v41 = v40;
v24 = v41;
v17 = 0;
v13 = v17;
v16 = v13;
v15 = v16;
v12 = v15;
*(&v42) = __ctype_get_mb_cur_max();
if (v42 > 1) {
v2 = print_bytes;
v3 = print_chars;
} else {
if (!print_bytes && !print_chars)
v42 = 0;
if (print_chars || print_bytes)
v42 = 1;
v2 = v42;
v2 &= 1;
v3 = 0;
}
if (!print_words && !print_linelength)
v42 = 0;
if (print_words || print_linelength)
v42 = 1;
v9 = v42;
v9 &= 1;
if (v9 || print_lines || (v2 ^ 1) || v3)
fdadvise(v63, 0x0, 0x0, 0x2);
if (v2 && (v3 ^ 1) && (print_lines ^ 1) && (v9 ^ 1)) {
v4 = 0;
if (v43->field_0 > 0)
v43->field_0 = fstat(v63, &v43->padding_4[4]);
if (!v43->field_0 && usable_st_size(&v43->padding_4[4]) && v43->field_38 >= 0) {
v25 = v43->field_38;
if ((v0 - 0 >> 63))
v0 = lseek(v63, 0x0, 0x1);
if ((0 CONCAT v25) /m page_size >> 64) {
if (v25 >= v0)
v60 = v25 - v0;
else
v60 = 0;
v13 = v60;
v4 = 1;
} else {
if (v43->field_40 > 0 && v43->field_40 <= 0x2000000000000000)
v61 = v43->field_40 + 1;
if (v43->field_40 <= 0 || v43->field_40 > 0x2000000000000000)
v61 = 513;
*(&v26) = v25 - ((0 CONCAT v25) /m v61 >> 64);
if (!((v0 - 0 >> 63)) && v0 < *(&v26)) {
v62 = lseek(v63, *(&v26), 0x1);
if (v62 >= 0)
v13 = *(&v26) - v0;
}
}
}
if ((v4 ^ 1)) {
fdadvise(v63, 0x0, 0x0, 0x2);
while (true) {
v14 = safe_read(v63, &v29, 0x4000, &v29);
if (!v14)
break;
if (v14 == -1) {
v64 = quotearg_n_style_colon(0x0, 0x3, v24);
error(0x0, *(__errno_location()), "%s");
v1 = 0;
break;
} else {
v13 = v14 + v13;
}
}
}
}
if (!(v9 ^ 1) || !(v3 ^ 1) || !(print_lines ^ 1) || !v2) {
if ((v3 ^ 1) && (v9 ^ 1)) {
if (avx2_supported())
wc_lines_p = got.wc_lines_avx2;
v1 = wc_lines(v56, 0, 0, 2, v57);
}
if (!(v9 ^ 1) || !(v3 ^ 1)) {
v44 = __ctype_get_mb_cur_max();
if (v44 > 1) {
v5 = 0;
v18 = 0;
v27 = 0;
v6 = 0;
v19 = 0;
while (true) {
v14 = safe_read(v63, &v29 + v19, 0x4000 - v19, &v29 + v19);
if (!v14)
break;
if (v14 == -1) {
v59 = quotearg_n_style_colon(0x0, 0x3, v24);
error(0x0, *(__errno_location()), "%s");
v1 = 0;
break;
} else {
v13 = v14 + v13;
v20 = &v29;
v14 += v19;
while (true) {
v7 = 1;
if ((v6 ^ 1)) {
v51 = is_basic(*(v20));
if (v51) {
v21 = 1;
v10 = *(v20);
v7 = 0;
}
}
if (!(v6 ^ 1) || !v51) {
v6 = 1;
v28 = v27;
v21 = rpl_mbrtowc(&v10, v20, v14, &v27);
if (v21 == -2) {
v27 = v28;
break;
} else if (v21 != -1) {
v51 = mbsinit(&v27);
if (v51)
v6 = 0;
if (!v21) {
v10 = 0;
v21 = 1;
}
}
if (v21 == -1) {
v20 += 1;
v14 -= 1;
}
}
if ((v21 != -1 || (v6 ^ 1)) && (v21 != -1 || v51) && (v21 != -2 || (v6 ^ 1)) && (v21 != -2 || v51)) {
switch (v10) {
case 32:
v18 += 1;
break;
case 9:
v18 = (v18 & -8) + 8;
case 11:
v15 += v5;
v5 = 0;
case 10:
v12 += 1;
case 12: case 13:
if (v18 > v17)
v17 = v18;
v18 = 0;
break;
}
if (v7) {
v51 = iswprint(v10);
if (v51) {
if (print_linelength) {
v11 = wcwidth(v10);
if (v11 > 0)
v18 += v11;
}
if (!iswspace(v10) && !iswnbspace(v10))
v5 = 1;
}
} else if ((v7 ^ 1)) {
v63 = *(v20);
*(&v51) = *((to_uchar(*(v20)) * 2 + *(__ctype_b_loc())));
*(&v51) = v51 & 0x4000;
if (v51) {
v18 += 1;
v63 = *(v20);
*(&v51) = *((to_uchar(*(v20)) * 2 + *(__ctype_b_loc())));
*(&v51) = v51 & 0x2000;
}
}
if (false)
v5 = 1;
v20 = &v20[v21];
v14 -= v21;
v16 += 1;
}
if (v21 != -2 || (v6 ^ 1) && v51) {
if (!v14)
break;
}
}
if (v14) {
if (v14 == 0x4000) {
v20 += 1;
v14 -= 1;
}
memmove(&v29, v20, v14);
}
v19 = v14;
}
}
if (v18 > v17)
v17 = v18;
v15 += v5;
} else {
v8 = 0;
v22 = 0;
while (true) {
v14 = safe_read(v63, &v29, 0x4000, &v29);
if (!v14)
break;
v23 = &v29;
if (v14 == -1) {
v58 = quotearg_n_style_colon(0x0, 0x3, v24);
error(0x0, *(__errno_location()), "%s");
v1 = 0;
break;
} else {
v13 = v14 + v13;
do {
tmp_12 = v23;
v23 += 1;
*(&v44) = *(tmp_12);
v47 = v44 - 9;
switch (v47) {
case 23:
v22 += 1;
break;
case 0:
v22 = (v22 & -8) + 8;
case 2:
v15 += v8;
v8 = 0;
case 1:
v12 += 1;
case 3: case 4:
if (v22 > v17)
v17 = v22;
v22 = 0;
break;
default:
*(&v47) = *((to_uchar(v23[1]) * 2 + *(__ctype_b_loc())));
*(&v47) = v47 & 0x4000;
}
if (v47 <= 23)
v47 = *((0x4 * &v47->padding_0[0] + &g_402e58)) + &g_402e58;
if (v47 && (v47 == 4200092 || v47 > 23)) {
v22 += 1;
v63 = v23[1];
*(&v47) = *((to_uchar(v23[1]) * 2 + *(__ctype_b_loc())));
*(&v47) = v47 & 0x2000;
}
if (false) {
v63 = v23[1];
v50 = isnbspace(to_uchar(v23[1]));
v8 = 1;
}
v14 -= 1;
} while (v14);
}
}
if (v22 > v17)
v17 = v22;
v15 += v8;
}
}
}
if (v3 < print_chars)
v16 = v13;
write_counts(v12, v15, v16, v13, v17, v40);
total_lines = v12 + total_lines;
total_words = v15 + total_words;
total_chars = v16 + total_chars;
total_bytes = v13 + total_bytes;
if (v17 > max_line_length)
max_line_length = v17;
if ((v32 ^ v39[5]))
__stack_chk_fail();
v65 = *(&v35);
v66 = *(&v36);
return;
}
|
void
seed_rng(void)
{
unsigned char buf[48];
ssh_libcrypto_init();
if (!ssh_compatible_openssl(
( (3<<28) |(0<<20) |(2<<4) |0x0L )
,
OpenSSL_version_num()))
sshfatal("entropy.c", __func__, 105, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "OpenSSL version mismatch. Built against %lx, you " "have %lx", (u_long)
( (3<<28) |(0<<20) |(2<<4) |0x0L )
, OpenSSL_version_num())
;
if (RAND_status() != 1)
sshfatal("entropy.c", __func__, 120, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "PRNG is not seeded");
arc4random_buf(buf, sizeof(buf));
explicit_bzero(buf, sizeof(buf));
}
| long long seed_rng(unsigned long long a0, unsigned long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) {
unsigned long v0;
char v1;
unsigned long long v2;
char v3;
unsigned long long v4;
ssh_libcrypto_init();
if (!ssh_compatible_openssl(0x30000020, OpenSSL_version_num(a0, a1, a2, a3, a4, a5))) {
v0 = OpenSSL_version_num(0x30000020, a1, a2, a3, a4, a5);
sshfatal("entropy.c", "seed_rng", 0x69, 0x0, 0x1, 0x0, "OpenSSL version mismatch. Built against %lx, you have %lx", 0x30000020);
}
if (RAND_status() != 1) {
v2 = "PRNG is not seeded";
sshfatal("entropy.c", "seed_rng", 0x78, 0x0, 0x1, 0x0, *(&v3), v4);
}
arc4random_buf(&v1, 0x30);
explicit_bzero(&v1, 0x30);
return 0;
}
|
static struct sshkey *
try_read_key(char **cpp)
{
struct sshkey *ret;
int r;
if ((ret = sshkey_new(KEY_UNSPEC)) ==
((void *)0)
)
sshfatal("ssh-keygen.c", __func__, 889, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "sshkey_new failed");
if ((r = sshkey_read(ret, cpp)) == 0)
return ret;
sshkey_free(ret);
return
((void *)0)
;
}
| int try_read_key(unsigned long long a0) {
unsigned int v0;
unsigned long long v1;
unsigned int v3;
v1 = sshkey_new(0xe);
if (!v1)
sshfatal("ssh-keygen.c", "try_read_key", 0x379, 0x0, 0x1, 0x0, "sshkey_new failed");
v0 = sshkey_read(v1, a0, a0);
if (!v0) {
v3 = v1;
} else {
sshkey_free(v1);
v3 = 0;
}
return v3;
}
|
void
rl_resize_terminal(void)
{
el_resize(e);
}
| long rl_resize_terminal()
{
return el_resize(e);
}
|
static char const *
find_bind_mount (char const * name)
{
char const * bind_mount =
((void *)0)
;
static struct mount_entry *mount_list;
static
_Bool
tried_mount_list =
0
;
if (!tried_mount_list)
{
if (!(mount_list = read_file_system_list (
0
)))
error (0,
(*__errno_location ())
, "%s", gettext ("cannot read table of mounted file systems"));
tried_mount_list =
1
;
}
struct stat name_stats;
if (stat (name, &name_stats) != 0)
return
((void *)0)
;
struct mount_entry *me;
for (me = mount_list; me; me = me->me_next)
{
if (me->me_dummy && me->me_devname[0] == '/'
&& (strcmp (me->me_mountdir, name) == 0))
{
struct stat dev_stats;
if (stat (me->me_devname, &dev_stats) == 0
&& ((name_stats).st_ino == (dev_stats).st_ino && (name_stats).st_dev == (dev_stats).st_dev))
{
bind_mount = me->me_devname;
break;
}
}
}
return bind_mount;
}
| int find_bind_mount(char *a0) {
void* v0;
struct_0 *v1;
char v2;
char v3;
char v4;
char v5;
unsigned long long v7;
unsigned int v8;
v0 = 0;
if ((tried_mount_list.6783 ^ 1)) {
mount_list.6782 = read_file_system_list(0x0);
if (!mount_list.6782) {
v7 = gettext("cannot read table of mounted file systems");
error(0x0, *(__errno_location()), "%s");
}
tried_mount_list.6783 = 1;
}
v8 = stat(a0, &v2);
if (v8) {
v8 = 0;
} else {
for (v1 = mount_list.6782; v1; v1 = v1->field_30) {
if ((v1->field_28 & 1) && *(v1->field_0) == 47) {
v8 = strcmp(v1->field_8, a0);
if (!v8) {
v8 = stat(v1->field_0, &v4);
if (!v8 && *(&v3) == *(&v5) && *(&v2) == *(&v4)) {
v0 = v1->field_0;
break;
}
}
}
}
v8 = v0;
}
return v8;
}
|
void
err_readonly (s)
const char *s;
{
report_error (gettext("%s: readonly variable"), s);
}
| long long err_readonly(unsigned int a0) {
unsigned long v1;
v1 = gettext("%s: readonly variable");
return report_error(v1, a0, v1);
}
|
static int process_msg(struct nlmsghdr *n, void *arg)
{
FILE *fp = (FILE *) arg;
struct genlmsghdr *ghdr;
struct rtattr *attrs[(__TCP_METRICS_ATTR_MAX - 1) + 1], *a;
const char *h;
int len = n->nlmsg_len;
inet_prefix daddr, saddr;
int atype, stype;
if (n->nlmsg_type != genl_family)
return -1;
len -= ((( ((sizeof(struct genlmsghdr))+4U -1) & ~(4U -1) )) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )));
if (len < 0)
return -1;
ghdr = ((void *)(((char *)n) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))));
if (ghdr->cmd != TCP_METRICS_CMD_GET)
return 0;
parse_rtattr(attrs, (__TCP_METRICS_ATTR_MAX - 1), (void *) ghdr + ( ((sizeof(struct genlmsghdr))+4U -1) & ~(4U -1) ),
len);
if (attrs[TCP_METRICS_ATTR_ADDR_IPV4]) {
if (f.daddr.family && f.daddr.family !=
2
)
return 0;
a = attrs[TCP_METRICS_ATTR_ADDR_IPV4];
daddr.family =
2
;
atype = TCP_METRICS_ATTR_ADDR_IPV4;
} else if (attrs[TCP_METRICS_ATTR_ADDR_IPV6]) {
if (f.daddr.family && f.daddr.family !=
10
)
return 0;
a = attrs[TCP_METRICS_ATTR_ADDR_IPV6];
daddr.family =
10
;
atype = TCP_METRICS_ATTR_ADDR_IPV6;
} else {
return 0;
}
if (get_addr_rta(&daddr, a, daddr.family))
return 0;
if (f.daddr.family && f.daddr.bitlen >= 0 &&
inet_addr_match(&daddr, &f.daddr, f.daddr.bitlen))
return 0;
if (attrs[TCP_METRICS_ATTR_SADDR_IPV4]) {
if (f.saddr.family && f.saddr.family !=
2
)
return 0;
a = attrs[TCP_METRICS_ATTR_SADDR_IPV4];
saddr.family =
2
;
stype = TCP_METRICS_ATTR_SADDR_IPV4;
} else if (attrs[TCP_METRICS_ATTR_SADDR_IPV6]) {
if (f.saddr.family && f.saddr.family !=
10
)
return 0;
a = attrs[TCP_METRICS_ATTR_SADDR_IPV6];
saddr.family =
10
;
stype = TCP_METRICS_ATTR_SADDR_IPV6;
} else {
saddr.family =
0
;
stype = 0;
}
if (saddr.family) {
if (get_addr_rta(&saddr, a, saddr.family))
return 0;
if (f.saddr.family && f.saddr.bitlen >= 0 &&
inet_addr_match(&saddr, &f.saddr, f.saddr.bitlen))
return 0;
}
if (f.flushb) {
struct nlmsghdr *fn;
struct { struct nlmsghdr n; struct genlmsghdr g; char buf[( ((0)+4U -1) & ~(4U -1) ) + (128)]; } req2 = { .n = { .nlmsg_type = (genl_family), .nlmsg_flags = (0x01), .nlmsg_len = ((( ((sizeof(struct genlmsghdr))+4U -1) & ~(4U -1) ) + (0)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))), }, .g = { .cmd = (TCP_METRICS_CMD_DEL), .version = (0x1), }, };
addattr_l(&req2.n, sizeof(req2), atype, daddr.data,
daddr.bytelen);
if (saddr.family)
addattr_l(&req2.n, sizeof(req2), stype, saddr.data,
saddr.bytelen);
if (( ((f.flushp)+4U -1) & ~(4U -1) ) + req2.n.nlmsg_len > f.flushe) {
if (flush_update())
return -1;
}
fn = (struct nlmsghdr *) (f.flushb + ( ((f.flushp)+4U -1) & ~(4U -1) ));
memcpy(fn, &req2.n, req2.n.nlmsg_len);
fn->nlmsg_seq = ++grth.seq;
f.flushp = (((char *) fn) + req2.n.nlmsg_len) - f.flushb;
f.flushed++;
if (show_stats < 2)
return 0;
}
open_json_object(
((void *)0)
);
if (f.cmd & (0x0002 | 0x0004))
print_bool(PRINT_ANY, "deleted", "Deleted ",
1
);
h = format_host(daddr.family, daddr.bytelen, daddr.data);
print_color_string(PRINT_ANY,
ifa_family_color(daddr.family),
"dst", "%s", h);
a = attrs[TCP_METRICS_ATTR_AGE];
if (a) {
__u64 val = rta_getattr_u64(a);
double age = val / 1000.;
print_float(PRINT_ANY, "age",
" age %.03fsec", age);
}
a = attrs[TCP_METRICS_ATTR_TW_TS_STAMP];
if (a) {
__s32 val = (__s32) rta_getattr_u32(a);
__u32 tsval;
char tw_ts[64];
a = attrs[TCP_METRICS_ATTR_TW_TSVAL];
tsval = a ? rta_getattr_u32(a) : 0;
snprintf(tw_ts, sizeof(tw_ts),
"%u/%d", tsval, val);
print_string(PRINT_ANY, "tw_ts_stamp",
" tw_ts %s ago", tw_ts);
}
if (attrs[TCP_METRICS_ATTR_VALS])
print_tcp_metrics(attrs[TCP_METRICS_ATTR_VALS]);
a = attrs[TCP_METRICS_ATTR_FOPEN_MSS];
if (a) {
print_uint(PRINT_ANY, "fopen_miss", " fo_mss %u",
rta_getattr_u16(a));
}
a = attrs[TCP_METRICS_ATTR_FOPEN_SYN_DROPS];
if (a) {
__u16 syn_loss = rta_getattr_u16(a);
double ts;
a = attrs[TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS];
ts = a ? rta_getattr_u64(a) : 0;
print_uint(PRINT_ANY, "fopen_syn_drops",
" fo_syn_drops %u", syn_loss);
print_float(PRINT_ANY, "fopen_syn_drop_ts",
"/%.03fusec ago",
ts / 1000000.);
}
a = attrs[TCP_METRICS_ATTR_FOPEN_COOKIE];
if (a) {
char cookie[32 + 1];
unsigned char *ptr = ((void*)(((char*)(a)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
int i, max = ((int)((a)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)));
if (max > 16)
max = 16;
cookie[0] = 0;
for (i = 0; i < max; i++)
sprintf(cookie + i + i, "%02x", ptr[i]);
print_string(PRINT_ANY, "fo_cookie",
" fo_cookie %s", cookie);
}
if (saddr.family) {
const char *src;
src = format_host(saddr.family, saddr.bytelen, saddr.data);
print_string(PRINT_ANY, "source",
" source %s", src);
}
print_string(PRINT_FP,
((void *)0)
, "\n", "");
close_json_object();
fflush(fp);
return 0;
}
| undefined8 process_msg(int *param_1,FILE *param_2)
{
undefined2 uVar1;
int iVar2;
undefined4 uVar3;
uint uVar4;
uint uVar5;
undefined8 uVar6;
void *__dest;
ulong uVar7;
long lVar8;
undefined8 *puVar9;
long in_FS_OFFSET;
byte bVar10;
double dVar11;
undefined4 local_3f4;
undefined4 local_3f0;
int local_3ec;
int local_3e8;
long local_3d8;
undefined local_388 [8];
long local_380;
long local_378;
long local_370;
long local_368;
long local_360;
long local_358;
long local_350;
long local_348;
long local_340;
ushort *local_338;
long local_330;
long local_328;
uint local_318;
undefined2 local_314;
undefined2 local_312;
undefined local_308;
undefined local_307;
undefined local_278 [2];
undefined2 local_276;
undefined2 local_272;
undefined local_270 [264];
undefined local_168 [2];
undefined2 local_166;
short local_162;
undefined local_160 [264];
char local_58 [72];
long local_10;
bVar10 = 0;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (*(ushort *)(param_1 + 1) == genl_family) {
if (*param_1 + -0x14 < 0) {
uVar6 = 0xffffffff;
}
else if (*(char *)(param_1 + 4) == '\x01') {
parse_rtattr(local_388,0xd,param_1 + 5,*param_1 + -0x14);
if (local_380 == 0) {
if (local_378 == 0) {
uVar6 = 0;
goto LAB_00100ead;
}
if ((f._34_2_ != 0) && (f._34_2_ != 10)) {
uVar6 = 0;
goto LAB_00100ead;
}
local_3d8 = local_378;
local_272 = 10;
local_3f4 = 2;
}
else {
if ((f._34_2_ != 0) && (f._34_2_ != 2)) {
uVar6 = 0;
goto LAB_00100ead;
}
local_3d8 = local_380;
local_272 = 2;
local_3f4 = 1;
}
iVar2 = get_addr_rta(local_278,local_3d8,local_272);
if (iVar2 == 0) {
if (((f._34_2_ == 0) || (f._32_2_ < 0)) ||
(iVar2 = inet_addr_match(local_278,0x10199c,(int)f._32_2_), iVar2 == 0)) {
if (local_330 == 0) {
if (local_328 == 0) {
local_162 = 0;
local_3f0 = 0;
}
else {
if ((f._298_2_ != 0) && (f._298_2_ != 10)) {
uVar6 = 0;
goto LAB_00100ead;
}
local_3d8 = local_328;
local_162 = 10;
local_3f0 = 0xc;
}
}
else {
if ((f._298_2_ != 0) && (f._298_2_ != 2)) {
uVar6 = 0;
goto LAB_00100ead;
}
local_3d8 = local_330;
local_162 = 2;
local_3f0 = 0xb;
}
if (local_162 != 0) {
iVar2 = get_addr_rta(local_168,local_3d8,local_162);
if (iVar2 != 0) {
uVar6 = 0;
goto LAB_00100ead;
}
if (((f._298_2_ != 0) && (-1 < f._296_2_)) &&
(iVar2 = inet_addr_match(local_168,0x101aa4,(int)f._296_2_), iVar2 != 0)) {
uVar6 = 0;
goto LAB_00100ead;
}
}
if (f._8_8_ != 0) {
puVar9 = (undefined8 *)&local_318;
for (lVar8 = 0x12; lVar8 != 0; lVar8 = lVar8 + -1) {
*puVar9 = 0;
puVar9 = puVar9 + (ulong)bVar10 * -2 + 1;
}
*(undefined4 *)puVar9 = 0;
local_318 = 0x14;
local_314 = (undefined2)genl_family;
local_312 = 1;
local_308 = 2;
local_307 = 1;
addattr_l(&local_318,0x94,local_3f4,local_270,local_276);
if (local_162 != 0) {
addattr_l(&local_318,0x94,local_3f0,local_160,local_166);
}
if ((f._20_4_ < (f._16_4_ + 3U & 0xfffffffc) + local_318) &&
(iVar2 = flush_update(), iVar2 != 0)) {
uVar6 = 0xffffffff;
goto LAB_00100ead;
}
__dest = (void *)((ulong)(f._16_4_ + 3U & 0xfffffffc) + f._8_8_);
memcpy(__dest,&local_318,(ulong)local_318);
grth._28_4_ = grth._28_4_ + 1;
*(int *)((long)__dest + 8) = grth._28_4_;
f._16_4_ = (local_318 + (int)__dest) - (int)f._8_8_;
f._0_4_ = f._0_4_ + 1;
if (show_stats < 2) {
uVar6 = 0;
goto LAB_00100ead;
}
}
open_json_object(0);
if ((f._24_4_ & 6) != 0) {
print_bool(4,"deleted","Deleted ",1);
}
uVar6 = format_host(local_272,local_276,local_270);
uVar3 = ifa_family_color((char)local_272);
print_color_string(4,uVar3,&DAT_00101d2c,&DAT_00101d29,uVar6);
if (local_370 != 0) {
uVar7 = rta_getattr_u64(local_370);
if ((long)uVar7 < 0) {
dVar11 = (double)(uVar7 >> 1 | (ulong)((uint)uVar7 & 1));
dVar11 = dVar11 + dVar11;
}
else {
dVar11 = (double)uVar7;
}
print_float(dVar11 / DAT_00101f80,4,&DAT_00101d3e," age %.03fsec");
}
if (local_360 != 0) {
uVar4 = rta_getattr_u32(local_360);
if (local_368 == 0) {
uVar5 = 0;
}
else {
uVar5 = rta_getattr_u32(local_368);
}
snprintf(local_58,0x40,"%u/%d",(ulong)uVar5,(ulong)uVar4);
print_string(4,"tw_ts_stamp"," tw_ts %s ago",local_58);
}
if (local_358 != 0) {
print_tcp_metrics(local_358);
}
if (local_350 != 0) {
uVar1 = rta_getattr_u16(local_350);
print_uint(4,"fopen_miss"," fo_mss %u",uVar1);
}
if (local_348 != 0) {
uVar1 = rta_getattr_u16(local_348);
if (local_340 != 0) {
rta_getattr_u64(local_340);
}
print_uint(4,"fopen_syn_drops"," fo_syn_drops %u",uVar1);
print_float(4,"fopen_syn_drop_ts","/%.03fusec ago");
}
if (local_338 != (ushort *)0x0) {
local_3e8 = *local_338 - 4;
if (0x10 < local_3e8) {
local_3e8 = 0x10;
}
local_58[0] = '\0';
for (local_3ec = 0; local_3ec < local_3e8; local_3ec = local_3ec + 1) {
sprintf(local_58 + (long)local_3ec * 2,"%02x",
(ulong)*(byte *)((long)local_338 + (long)local_3ec + 4));
}
print_string(4,"fo_cookie"," fo_cookie %s",local_58);
}
if (local_162 != 0) {
uVar6 = format_host(local_162,local_166,local_160);
print_string(4,"source"," source %s",uVar6);
}
print_string(1,0,&DAT_00101dea,&DAT_00101de9);
close_json_object();
fflush(param_2);
uVar6 = 0;
}
else {
uVar6 = 0;
}
}
else {
uVar6 = 0;
}
}
else {
uVar6 = 0;
}
}
else {
uVar6 = 0xffffffff;
}
LAB_00100ead:
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return uVar6;
}
__stack_chk_fail();
}
|
static int
read__fixio(int fd __attribute__((__unused__)), int e)
{
switch (e) {
case -1:
case
11
:
e = 0;
if ((e = fcntl(fd,
3
, 0)) == -1)
return -1;
if (fcntl(fd,
4
, e & ~
04000
) == -1)
return -1;
else
e = 1;
return e ? 0 : -1;
case
4
:
return 0;
default:
return -1;
}
}
| int read__fixio(unsigned long a0, unsigned long a1) {
unsigned int v0;
unsigned int v2;
v0 = a1;
if (v0 == 11) {
v0 = 0;
v0 = fcntl(a0, 0x3);
if (v0 == -1) {
v2 = -1;
} else {
if (fcntl(a0, 0x4) == -1) {
v2 = -1;
} else {
v0 = 1;
if (!v0)
v2 = -1;
else
v2 = 0;
}
}
} else if (v0 > 11) {
v2 = -1;
} else if (v0 != -1 && v0 == 4) {
v2 = 0;
}
return v2;
}
|
static void
factor_insert_refind (struct factors *factors, uintmax_t p, unsigned int i,
unsigned int off)
{
for (unsigned int j = 0; j < off; j++)
p += primes_diff[i + j];
factor_insert_multiplicity (factors, p, 1);
}
| _BYTE * factor_insert_refind(_BYTE *a1, unsigned long a2, int a3, unsigned int a4)
{
unsigned int i;
for ( i = 0; i < a4; ++i )
a2 += primes_diff[a3 + i];
return factor_insert_multiplicity(a1, a2, 1);
}
|
static void batadv_print_help(struct link_util *lu, int argc, char **argv,
FILE *f)
{
print_explain(f);
}
| long long batadv_print_help(unsigned long a0, unsigned long a1, unsigned long a2, void* a3) {
unsigned long v0;
unsigned int v1;
unsigned long v2;
v2 = a0;
v1 = a1;
v0 = a2;
return print_explain(a3);
}
|
void
chan_read_failed(struct ssh *ssh, Channel *c)
{
sshlog("nchan.c", __func__, 115, 0, SYSLOG_LEVEL_DEBUG2,
((void *)0)
, "channel %d: read failed", c->self);
switch (c->istate) {
case 0:
chan_shutdown_read(ssh, c);
chan_set_istate(c, 1);
break;
default:
sshlog("nchan.c", __func__, 122, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "channel %d: chan_read_failed for istate %d", c->self, c->istate)
;
break;
}
}
| long long chan_read_failed(unsigned long long a0, unsigned int a1[5]) {
unsigned long long v1;
sshlog("nchan.c", "chan_read_failed", 0x73, 0x0, 0x6, 0x0, "channel %d: read failed", a1[1], a1);
if (!a1[4]) {
chan_shutdown_read(a0, a1);
v1 = chan_set_istate(a1, 0x1);
return v1;
}
v1 = sshlog("nchan.c", "chan_read_failed", 0x7a, 0x0, 0x2, 0x0, "channel %d: chan_read_failed for istate %d", a1[1], a1[4]);
return v1;
}
|
void
usage (int status)
{
((void) sizeof ((
status ==
0) ? 1 : 0), __extension__ ({ if (
status ==
0) ; else __assert_fail (
"status == EXIT_SUCCESS"
, "src/echo.c", 40, __extension__ __PRETTY_FUNCTION__); }))
;
printf (gettext ("Usage: %s [SHORT-OPTION]... [STRING]...\n or: %s LONG-OPTION\n")
, program_name, program_name);
fputs_unlocked (gettext ("Echo the STRING(s) to standard output.\n\n -n do not output the trailing newline\n"),
stdout
)
;
fputs_unlocked (gettext (DEFAULT_ECHO_TO_XPG ? " -e enable interpretation of backslash escapes (default)\n -E disable interpretation of backslash escapes\n" : " -e enable interpretation of backslash escapes\n -E disable interpretation of backslash escapes (default)\n"),
stdout
)
;
fputs_unlocked (gettext (" --help display this help and exit\n"),
stdout
);
fputs_unlocked (gettext (" --version output version information and exit\n"),
stdout
);
fputs_unlocked (gettext ("\nIf -e is in effect, the following sequences are recognized:\n\n"),
stdout
)
;
fputs_unlocked (gettext (" \\\\ backslash\n \\a alert (BEL)\n \\b backspace\n \\c produce no further output\n \\e escape\n \\f form feed\n \\n new line\n \\r carriage return\n \\t horizontal tab\n \\v vertical tab\n"),
stdout
)
;
fputs_unlocked (gettext (" \\0NNN byte with octal value NNN (1 to 3 digits)\n \\xHH byte with hexadecimal value HH (1 to 2 digits)\n"),
stdout
)
;
printf (gettext ("\n" "NOTE: your shell may have its own version of %s, which usually supersedes\n" "the version described here. Please refer to your shell's documentation\n" "for details about the options it supports.\n"), "echo");
fputs_unlocked (gettext ("\nNOTE: printf(1) is a preferred alternative,\nwhich does not have issues outputting option-like strings.\n"),
stdout
)
;
emit_ancillary_info ("echo");
exit (status);
}
| void usage(unsigned long a0) {
unsigned long v0;
unsigned long v1;
unsigned long v3;
unsigned long v4;
v1 = v3;
v0 = v4;
if (!a0) {
printf(gettext("Usage: %s [SHORT-OPTION]... [STRING]...\n or: %s LONG-OPTION\n"));
fputs_unlocked(gettext("Echo the STRING(s) to standard output.\n\n -n do not output the trailing newline\n"), stdout);
fputs_unlocked(gettext(" -e enable interpretation of backslash escapes\n -E disable interpretation of backslash escapes (default)\n"), stdout);
fputs_unlocked(gettext(" --help display this help and exit\n"), stdout);
fputs_unlocked(gettext(" --version output version information and exit\n"), stdout);
fputs_unlocked(gettext("\nIf -e is in effect, the following sequences are recognized:\n\n"), stdout);
fputs_unlocked(gettext(" \\\\ backslash\n \\a alert (BEL)\n \\b backspace\n \\c produce no further output\n \\e escape\n \\f form feed\n \\n new line\n \\r carriage return\n \\t horizontal tab\n \\v vertical tab\n"), stdout);
fputs_unlocked(gettext(" \\0NNN byte with octal value NNN (1 to 3 digits)\n \\xHH byte with hexadecimal value HH (1 to 2 digits)\n"), stdout);
printf(gettext("\nNOTE: your shell may have its own version of %s, which usually supersedes\nthe version described here. Please refer to your shell's documentation\nfor details about the options it supports.\n"));
fputs_unlocked(gettext("\nNOTE: printf(1) is a preferred alternative,\nwhich does not have issues outputting option-like strings.\n"), stdout);
emit_ancillary_info("echo");
exit(a0);
}
__assert_fail();
}
|
SHELL_VAR *
builtin_bind_variable (name, value, flags)
char *name;
char *value;
int flags;
{
SHELL_VAR *v;
int vflags, bindflags;
vflags = assoc_expand_once ? (0x001|0x002) : 0;
bindflags = flags | (assoc_expand_once ? 0x0080 : 0) | 0x0800;
if (flags & 0x0080)
vflags |= 0x001;
if (flags & 0x1000)
vflags |= 0x002;
if (valid_array_reference (name, vflags) == 0)
v = bind_variable (name, value, flags);
else
v = assign_array_element (name, value, bindflags, (array_eltstate_t *)0);
if (v && ((((v)->attributes) & (0x0000002))) == 0 && ((((v)->attributes) & (0x0004000))) == 0)
((v)->attributes &= ~(0x0001000));
return v;
}
| long builtin_bind_variable(long a1, long a2, unsigned int a3)
{
int v3;
int v4;
unsigned int v5;
int v6;
unsigned int v9;
unsigned int v10;
long v11;
if ( assoc_expand_once )
v3 = 3;
else
v3 = 0;
v9 = v3;
if ( assoc_expand_once )
v4 = 128;
else
v4 = 0;
v5 = a3 | v4;
BYTE1(v5) |= 8u;
v10 = v5;
if ( (a3 & 0x80) != 0 )
v9 |= 1u;
if ( (a3 & 0x1000) != 0 )
v9 |= 2u;
if ( (unsigned int)valid_array_reference(a1, v9) )
v11 = assign_array_element(a1, a2, v10, 0LL);
else
v11 = bind_variable(a1, a2, a3);
if ( v11 && (*(_DWORD *)(v11 + 40) & 2) == 0 && (*(_DWORD *)(v11 + 40) & 0x4000) == 0 )
{
v6 = *(_DWORD *)(v11 + 40);
BYTE1(v6) &= ~0x10u;
*(_DWORD *)(v11 + 40) = v6;
}
return v11;
}
|
WORD_LIST *
expand_word_leave_quoted (word, quoted)
WORD_DESC *word;
int quoted;
{
WORD_LIST *result;
expand_no_split_dollar_star = 1;
if (ifs_is_null)
word->flags |= (1 << 4);
word->flags |= (1 << 6);
result = call_expand_word_internal (word, quoted, 0, (int *)
((void *)0)
, (int *)
((void *)0)
);
expand_no_split_dollar_star = 0;
return result;
}
| int expand_word_leave_quoted(struct_0 *a0, unsigned long a1) {
unsigned long v0;
expand_no_split_dollar_star = 1;
a0->field_8 = a0->field_8 | 16;
a0->field_8 = a0->field_8 | 64;
v0 = call_expand_word_internal(a0, a1, 0x0, 0x0, 0x0);
expand_no_split_dollar_star = 0;
return v0;
}
|
static void
debug_print_current_time (char const *item, parser_control *pc)
{
_Bool
space =
0
;
if (!debugging (pc))
return;
dbg_printf (gettext ("parsed %s part: "), item);
if (pc->dates_seen && !pc->debug_dates_seen)
{
fprintf (
stderr
, "(Y-M-D) %04"
"l" "d"
"-%02"
"l" "d"
"-%02"
"l" "d"
,
pc->year.value, pc->month, pc->day);
pc->debug_dates_seen =
1
;
space =
1
;
}
if (pc->year_seen != pc->debug_year_seen)
{
if (space)
fputc (' ',
stderr
);
fprintf (
stderr
, gettext ("year: %04"
"l" "d"
), pc->year.value);
pc->debug_year_seen = pc->year_seen;
space =
1
;
}
if (pc->times_seen && !pc->debug_times_seen)
{
intmax_t sec = pc->seconds.tv_sec;
fprintf (
stderr
, &" %02"
"l" "d"
":%02"
"l" "d"
":%02"
"l" "d"
[!space],
pc->hour, pc->minutes, sec);
if (pc->seconds.tv_nsec != 0)
{
int nsec = pc->seconds.tv_nsec;
fprintf (
stderr
, ".%09d", nsec);
}
if (pc->meridian == MERpm)
fputs ("pm",
stderr
);
pc->debug_times_seen =
1
;
space =
1
;
}
if (pc->days_seen && !pc->debug_days_seen)
{
if (space)
fputc (' ',
stderr
);
char tmp[DBGBUFSIZE];
fprintf (
stderr
, gettext ("%s (day ordinal=%"
"l" "d"
" number=%d)"),
str_days (pc, tmp, sizeof tmp),
pc->day_ordinal, pc->day_number);
pc->debug_days_seen =
1
;
space =
1
;
}
if (pc->local_zones_seen && !pc->debug_local_zones_seen)
{
fprintf (
stderr
, &" isdst=%d%s"[!space],
pc->local_isdst, pc->dsts_seen ? " DST" : "");
pc->debug_local_zones_seen =
1
;
space =
1
;
}
if (pc->zones_seen && !pc->debug_zones_seen)
{
char time_zone_buf[TIME_ZONE_BUFSIZE];
fprintf (
stderr
, &" UTC%s"[!space],
time_zone_str (pc->time_zone, time_zone_buf));
pc->debug_zones_seen =
1
;
space =
1
;
}
if (pc->timespec_seen)
{
intmax_t sec = pc->seconds.tv_sec;
if (space)
fputc (' ',
stderr
);
fprintf (
stderr
, gettext ("number of seconds: %"
"l" "d"
), sec);
}
fputc ('\n',
stderr
);
}
| void debug_print_current_time(unsigned long a0, struct_0 *a1) {
unsigned long v0;
char v1;
unsigned int v2;
unsigned long v3;
unsigned long v4;
char v5;
char v6;
unsigned long long v9;
unsigned long long *v10;
unsigned long long v11;
v0 = a0;
v1 = 0;
if (!(debugging(a1) ^ 1)) {
gettext("parsed %s part: ");
dbg_printf();
if (a1->field_a8 && (a1->field_d9 ^ 1)) {
fprintf(*(got.stderr), "(Y-M-D) %04ld-%02ld-%02ld", a1->field_28, a1->field_38, a1->field_40);
a1->field_d9 = 1;
v1 = 1;
}
if (a1->field_d8 != a1->field_de) {
if (v1)
fputc(0x20, *(got.stderr));
fprintf(*(got.stderr), gettext("year: %04ld"));
a1->field_de = a1->field_d8;
v1 = 1;
}
if (a1->field_c8 && (a1->field_dc ^ 1)) {
v3 = a1->field_58;
fprintf(*(got.stderr), (4221648 + (v1 ^ 1)));
if (a1->field_60) {
v2 = a1->field_60;
fprintf(*(got.stderr), ".%09d", v2);
}
if (a1->field_1c == 1)
fputs("pm", *(got.stderr));
a1->field_dc = 1;
v1 = 1;
}
if (a1->field_b0 && (a1->field_da ^ 1)) {
if (v1)
fputc(0x20, *(got.stderr));
v9 = str_days(a1, &v5, 0x64);
fprintf(*(got.stderr), gettext("%s (day ordinal=%ld number=%d)"));
a1->field_da = 1;
v1 = 1;
}
if (a1->field_b8 && (a1->field_db ^ 1)) {
fprintf(*(got.stderr), (4221717 + (v1 ^ 1)));
a1->field_db = 1;
v1 = 1;
}
if (a1->field_d0 && (a1->field_dd ^ 1)) {
time_zone_str(a1->field_18, &v5);
fprintf(*(got.stderr), (4221729 + (v1 ^ 1)));
a1->field_dd = 1;
v1 = 1;
}
if (a1->field_a0) {
v4 = a1->field_58;
if (v1)
fputc(0x20, *(got.stderr));
fprintf(*(got.stderr), gettext("number of seconds: %ld"));
}
fputc(0xa, *(got.stderr));
}
v11 = *(&v6) ^ v10[5];
return;
}
|
static void
volume_filename_decoder (struct tar_stat_info *st,
char const *keyword __attribute__((unused)),
char const *arg,
size_t size __attribute__((unused)))
{
decode_string (&continued_file_name, arg);
}
| long volume_filename_decoder(long a1, long a2, long a3)
{
return decode_string(&continued_file_name, a3);
}
|
static void
print_login (const STRUCT_UTMP *utmp_ent)
{
char *comment = make_id_equals_comment (utmp_ent);
char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid));
print_line (-1, gettext ("LOGIN"), ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line,
time_string (utmp_ent), "", pidstr, comment, "");
free (comment);
}
| void print_login(struct_0 *a0) {
unsigned long v0;
char v1;
char v2;
unsigned long long *v4;
unsigned long long v5;
v0 = make_id_equals_comment(a0);
sprintf(&v1, "%ld", a0->field_4);
print_line(0xffffffff, gettext("LOGIN"), 0x20, 0x20, a0 + 1, time_string(a0), &g_401de3, &v1, v0, &g_401de3);
free(v0);
v5 = *(&v2) ^ v4[5];
return;
}
|
void
uwp_init ()
{
do { (uwcache).data = sh_xmalloc(((128) * sizeof (UNWIND_ELT *)), "unwind_prot.c", 108); (uwcache).cs = (128); (uwcache).nc = 0; } while (0);
}
| long long uwp_init() {
uwcache = sh_xmalloc(0x400, "unwind_prot.c", 0x6c);
g_400c28 = 128;
g_400c2c = 0;
return uwcache;
}
|
static inline intmax_t getn(const char *s)
{
return atomax10(s);
}
| int getn(unsigned long long a0) {
return atomax10(a0);
}
|
char *
expand_and_quote_kvpair_word (w)
char *w;
{
char *r, *s, *t;
t = w ? expand_subscript_string (w, 0) : 0;
s = (t && strchr (t, '\001')) ? quote_escapes (t) : t;
r = sh_single_quote (s ? s : "");
if (s != t)
sh_xfree((s), "arrayfunc.c", 684);
sh_xfree((t), "arrayfunc.c", 685);
return r;
}
| long long expand_and_quote_kvpair_word(unsigned long long a0) {
void* v0;
void* v1;
unsigned long v2;
void* v4;
void* v5;
unsigned long long v6;
if (!a0)
v4 = 0;
else
v4 = expand_subscript_string(a0, 0x0);
v0 = v4;
if (v0 && strchr(v0, 0x1)) {
v5 = quote_escapes(v0);
goto LABEL_4013cc;
}
v5 = v0;
LABEL_4013cc:
v1 = v5;
if (!v1)
v6 = &g_403ab5;
else
v6 = v1;
v2 = sh_single_quote(v6);
if (v1 != v0)
sh_xfree(v1, "arrayfunc.c", 0x2ac);
sh_xfree(v0, "arrayfunc.c", 0x2ad);
return v2;
}
|
vi_undo_line(EditLine *el, wint_t c __attribute__((__unused__)))
{
cv_undo(el);
return hist_get(el);
}
| long long vi_undo_line(unsigned long long a0, unsigned long a1) {
unsigned int v0;
v0 = a1;
cv_undo(a0);
return hist_get(a0);
}
|
intmax_t lookupvarint(const char *name)
{
return atomax(lookupvar(name) ?: nullstr, 0);
}
| long long lookupvarint(unsigned long long a0) {
unsigned long long v1;
v1 = lookupvar(a0);
if (!v1)
v1 = &nullstr;
return atomax(v1, 0x0);
}
|
static
void crcError ( void )
{
fprintf (
stderr
,
"\n%s: Data integrity error when decompressing.\n",
progName );
showFileNames();
cadvise();
cleanUpAndFail( 2 );
}
| void crcError() {
fprintf(stderr, "\n%s: Data integrity error when decompressing.\n", progName);
showFileNames();
cadvise();
cleanUpAndFail(0x2);
}
|
void
jump_to_top_level (value)
int value;
{
siglongjmp((top_level), (value));
}
| void jump_to_top_level(unsigned long a0) {
siglongjmp(&top_level_mask, a0);
}
|
static SHELL_VAR *
assign_random (self, value, unused, key)
SHELL_VAR *self;
char *value;
arrayind_t unused;
char *key;
{
intmax_t seedval;
int expok;
if (((((self)->attributes) & (0x0000010))))
seedval = evalexp (value, 0, &expok);
else
expok = legal_number (value, &seedval);
if (expok == 0)
return (self);
sbrand (seedval);
if (subshell_environment)
seeded_subshell = getpid ();
return (set_int_value (self, seedval, ((((self)->attributes) & (0x0000010))) != 0));
}
| long long assign_random(struct_0 *a0, unsigned long long a1, unsigned long a2, unsigned long a3) {
unsigned long v0;
unsigned long v1;
unsigned int v2;
unsigned long long v3;
struct_0 *v5;
v1 = a2;
v0 = a3;
if (!(a0->field_28 & 16))
v2 = legal_number(a1, &v3, &v3);
else
v3 = evalexp(a1, 0x0, &v2);
if (!v2) {
v5 = a0;
return v5;
}
sbrand(v3);
if (subshell_environment)
seeded_subshell = getpid();
v5 = set_int_value(a0, v3, (a0->field_28 & 16));
return v5;
}
|
static void explain(void)
{
print_explain(
stderr
);
}
| int explain()
{
return print_explain(stderr);
}
|
int
parse_forward(struct Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
{
struct fwdarg fwdargs[4];
char *p, *cp;
int i, err;
memset(fwd, 0, sizeof(*fwd));
memset(fwdargs, 0, sizeof(fwdargs));
cp = p = dollar_expand(&err, fwdspec);
if (p ==
((void *)0)
|| err)
return 0;
while (
((*__ctype_b_loc ())[(int) ((
(u_char)*cp
))] & (unsigned short int) _ISspace)
)
cp++;
for (i = 0; i < 4; ++i) {
if (parse_fwd_field(&cp, &fwdargs[i]) != 0)
break;
}
if (cp !=
((void *)0)
&& *cp != '\0') {
i = 0;
}
switch (i) {
case 1:
if (fwdargs[0].ispath) {
fwd->listen_path = xstrdup(fwdargs[0].arg);
fwd->listen_port = -2;
} else {
fwd->listen_host =
((void *)0)
;
fwd->listen_port = a2port(fwdargs[0].arg);
}
fwd->connect_host = xstrdup("socks");
break;
case 2:
if (fwdargs[0].ispath && fwdargs[1].ispath) {
fwd->listen_path = xstrdup(fwdargs[0].arg);
fwd->listen_port = -2;
fwd->connect_path = xstrdup(fwdargs[1].arg);
fwd->connect_port = -2;
} else if (fwdargs[1].ispath) {
fwd->listen_host =
((void *)0)
;
fwd->listen_port = a2port(fwdargs[0].arg);
fwd->connect_path = xstrdup(fwdargs[1].arg);
fwd->connect_port = -2;
} else {
fwd->listen_host = xstrdup(fwdargs[0].arg);
fwd->listen_port = a2port(fwdargs[1].arg);
fwd->connect_host = xstrdup("socks");
}
break;
case 3:
if (fwdargs[0].ispath) {
fwd->listen_path = xstrdup(fwdargs[0].arg);
fwd->listen_port = -2;
fwd->connect_host = xstrdup(fwdargs[1].arg);
fwd->connect_port = a2port(fwdargs[2].arg);
} else if (fwdargs[2].ispath) {
fwd->listen_host = xstrdup(fwdargs[0].arg);
fwd->listen_port = a2port(fwdargs[1].arg);
fwd->connect_path = xstrdup(fwdargs[2].arg);
fwd->connect_port = -2;
} else {
fwd->listen_host =
((void *)0)
;
fwd->listen_port = a2port(fwdargs[0].arg);
fwd->connect_host = xstrdup(fwdargs[1].arg);
fwd->connect_port = a2port(fwdargs[2].arg);
}
break;
case 4:
fwd->listen_host = xstrdup(fwdargs[0].arg);
fwd->listen_port = a2port(fwdargs[1].arg);
fwd->connect_host = xstrdup(fwdargs[2].arg);
fwd->connect_port = a2port(fwdargs[3].arg);
break;
default:
i = 0;
}
free(p);
if (dynamicfwd) {
if (!(i == 1 || i == 2))
goto fail_free;
} else {
if (!(i == 3 || i == 4)) {
if (fwd->connect_path ==
((void *)0)
&&
fwd->listen_path ==
((void *)0)
)
goto fail_free;
}
if (fwd->connect_port <= 0 && fwd->connect_path ==
((void *)0)
)
goto fail_free;
}
if ((fwd->listen_port < 0 && fwd->listen_path ==
((void *)0)
) ||
(!remotefwd && fwd->listen_port == 0))
goto fail_free;
if (fwd->connect_host !=
((void *)0)
&&
strlen(fwd->connect_host) >=
1025
)
goto fail_free;
if (fwd->connect_path !=
((void *)0)
&&
strlen(fwd->connect_path) >= (sizeof((struct sockaddr_un *)0)->sun_path))
goto fail_free;
if (fwd->listen_host !=
((void *)0)
&&
strlen(fwd->listen_host) >=
1025
)
goto fail_free;
if (fwd->listen_path !=
((void *)0)
&&
strlen(fwd->listen_path) >= (sizeof((struct sockaddr_un *)0)->sun_path))
goto fail_free;
return (i);
fail_free:
free(fwd->connect_host);
fwd->connect_host =
((void *)0)
;
free(fwd->connect_path);
fwd->connect_path =
((void *)0)
;
free(fwd->listen_host);
fwd->listen_host =
((void *)0)
;
free(fwd->listen_path);
fwd->listen_path =
((void *)0)
;
return (0);
}
| int parse_forward(char **param_1,undefined8 param_2,int param_3,int param_4)
{
int iVar1;
undefined4 uVar2;
ushort **ppuVar3;
char *pcVar4;
size_t sVar5;
long in_FS_OFFSET;
int local_70;
int local_6c;
byte *local_68;
byte *local_60;
undefined8 local_58;
int local_50;
undefined8 local_48;
int local_40;
undefined8 local_38;
int local_30;
undefined8 local_28;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(param_1,0,0x38);
memset(&local_58,0,0x40);
local_68 = (byte *)dollar_expand(&local_70,param_2);
local_60 = local_68;
if ((local_68 == (byte *)0x0) || (local_70 != 0)) {
iVar1 = 0;
goto LAB_00109259;
}
while (ppuVar3 = __ctype_b_loc(), ((*ppuVar3)[*local_68] & 0x2000) != 0) {
local_68 = local_68 + 1;
}
local_6c = 0;
while ((local_6c < 4 &&
(iVar1 = parse_fwd_field(&local_68,&local_58 + (long)local_6c * 2), iVar1 == 0))) {
local_6c = __addvsi3(local_6c,1);
}
if ((local_68 != (byte *)0x0) && (*local_68 != 0)) {
local_6c = 0;
}
if (local_6c == 4) {
pcVar4 = (char *)xstrdup(local_58);
*param_1 = pcVar4;
uVar2 = a2port(local_48);
*(undefined4 *)(param_1 + 1) = uVar2;
pcVar4 = (char *)xstrdup(local_38);
param_1[3] = pcVar4;
uVar2 = a2port(local_28);
*(undefined4 *)(param_1 + 4) = uVar2;
}
else if (local_6c < 5) {
if (local_6c == 3) {
if (local_50 == 0) {
if (local_30 == 0) {
*param_1 = (char *)0x0;
uVar2 = a2port(local_58);
*(undefined4 *)(param_1 + 1) = uVar2;
pcVar4 = (char *)xstrdup(local_48);
param_1[3] = pcVar4;
uVar2 = a2port(local_38);
*(undefined4 *)(param_1 + 4) = uVar2;
}
else {
pcVar4 = (char *)xstrdup(local_58);
*param_1 = pcVar4;
uVar2 = a2port(local_48);
*(undefined4 *)(param_1 + 1) = uVar2;
pcVar4 = (char *)xstrdup(local_38);
param_1[5] = pcVar4;
*(undefined4 *)(param_1 + 4) = 0xfffffffe;
}
}
else {
pcVar4 = (char *)xstrdup(local_58);
param_1[2] = pcVar4;
*(undefined4 *)(param_1 + 1) = 0xfffffffe;
pcVar4 = (char *)xstrdup(local_48);
param_1[3] = pcVar4;
uVar2 = a2port(local_38);
*(undefined4 *)(param_1 + 4) = uVar2;
}
}
else {
if (3 < local_6c) goto LAB_00109096;
if (local_6c == 1) {
if (local_50 == 0) {
*param_1 = (char *)0x0;
uVar2 = a2port(local_58);
*(undefined4 *)(param_1 + 1) = uVar2;
}
else {
pcVar4 = (char *)xstrdup(local_58);
param_1[2] = pcVar4;
*(undefined4 *)(param_1 + 1) = 0xfffffffe;
}
pcVar4 = (char *)xstrdup("socks");
param_1[3] = pcVar4;
}
else {
if (local_6c != 2) goto LAB_00109096;
if ((local_50 == 0) || (local_40 == 0)) {
if (local_40 == 0) {
pcVar4 = (char *)xstrdup(local_58);
*param_1 = pcVar4;
uVar2 = a2port(local_48);
*(undefined4 *)(param_1 + 1) = uVar2;
pcVar4 = (char *)xstrdup("socks");
param_1[3] = pcVar4;
}
else {
*param_1 = (char *)0x0;
uVar2 = a2port(local_58);
*(undefined4 *)(param_1 + 1) = uVar2;
pcVar4 = (char *)xstrdup(local_48);
param_1[5] = pcVar4;
*(undefined4 *)(param_1 + 4) = 0xfffffffe;
}
}
else {
pcVar4 = (char *)xstrdup(local_58);
param_1[2] = pcVar4;
*(undefined4 *)(param_1 + 1) = 0xfffffffe;
pcVar4 = (char *)xstrdup(local_48);
param_1[5] = pcVar4;
*(undefined4 *)(param_1 + 4) = 0xfffffffe;
}
}
}
}
else {
LAB_00109096:
local_6c = 0;
}
free(local_60);
if (param_3 == 0) {
if (((((local_6c == 3) || (local_6c == 4)) || (param_1[5] != (char *)0x0)) ||
(param_1[2] != (char *)0x0)) && ((0 < *(int *)(param_1 + 4) || (param_1[5] != (char *)0x0)))
) goto LAB_00109109;
}
else if ((local_6c == 1) || (local_6c == 2)) {
LAB_00109109:
if (((((-1 < *(int *)(param_1 + 1)) || (param_1[2] != (char *)0x0)) &&
((param_4 != 0 || (*(int *)(param_1 + 1) != 0)))) &&
((((param_1[3] == (char *)0x0 || (sVar5 = strlen(param_1[3]), sVar5 < 0x401)) &&
((param_1[5] == (char *)0x0 || (sVar5 = strlen(param_1[5]), sVar5 < 0x6c)))) &&
((*param_1 == (char *)0x0 || (sVar5 = strlen(*param_1), sVar5 < 0x401)))))) &&
((iVar1 = local_6c, param_1[2] == (char *)0x0 ||
(sVar5 = strlen(param_1[2]), iVar1 = local_6c, sVar5 < 0x6c)))) goto LAB_00109259;
}
free(param_1[3]);
param_1[3] = (char *)0x0;
free(param_1[5]);
param_1[5] = (char *)0x0;
free(*param_1);
*param_1 = (char *)0x0;
free(param_1[2]);
param_1[2] = (char *)0x0;
iVar1 = 0;
LAB_00109259:
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return iVar1;
}
__stack_chk_fail();
}
|
static int
history_def_curr(void *p, HistEventW *ev)
{
history_t *h = (history_t *) p;
if (h->cursor != &h->list)
*ev = h->cursor->ev;
else {
{ ev->num = (h->cur > 0) ? 8 : 5; ev->str = he_errlist[(h->cur > 0) ? 8 : 5]; }
;
return -1;
}
return 0;
}
| long long history_def_curr(struct_0 *a0, unsigned long long a1[2]) {
unsigned long long v1;
unsigned long long v2;
unsigned int v3;
unsigned long long v4;
if (a0->field_28 != a0) {
v1 = a0->field_28->field_8;
a1[0] = a0->field_28->field_0;
a1[1] = v1;
v2 = 0;
} else {
if (a0->field_34 <= 0)
v3 = 5;
else
v3 = 8;
*(&a1[0]) = v3;
if (a0->field_34 > 0)
v4 = 8;
else
v4 = 5;
a1[1] = (&he_errlist)[v4];
v2 = 4294967295;
}
return v2;
}
|
test_code_t test_tls1(gnutls_session_t session)
{
int ret;
sprintf(prio_str,
"NONE:" "+CIPHER-ALL:+ARCFOUR-128:+3DES-CBC" ":+GOST28147-TC26Z-CNT" ":" "+COMP-NULL"
":+VERS-TLS1.0:%%SSL3_RECORD_VERSION:" "+MAC-ALL:+MD5:+SHA1" ":+GOST28147-TC26Z-IMIT" ":" "+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH" ":+VKO-GOST-12" ":%s", rest);
{ int _ret; if ((_ret=__gnutls_priority_set_direct(session, prio_str, 1002)) != TEST_SUCCEED) { return _ret; } };
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = test_do_handshake(session);
if (ret == TEST_SUCCEED)
tls1_ok = 1;
return ret;
}
| long long test_tls1(unsigned long long a0) {
unsigned int v0;
unsigned int v1;
unsigned long long v3;
sprintf(&prio_str, "NONE:+CIPHER-ALL:+ARCFOUR-128:+3DES-CBC:+GOST28147-TC26Z-CNT:+COMP-NULL:+VERS-TLS1.0:%%SSL3_RECORD_VERSION:+MAC-ALL:+MD5:+SHA1:+GOST28147-TC26Z-IMIT:+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH:+VKO-GOST-12:%s", &rest);
v0 = __gnutls_priority_set_direct(a0, &prio_str, 0x3ea);
if (v0) {
v3 = v0;
return v3;
}
gnutls_credentials_set(a0, 0x1, xcred);
v1 = test_do_handshake(a0);
if (!v1)
tls1_ok = 1;
v3 = v1;
return v3;
}
|
rsRetVal iminternalAddMsg(smsg_t *pMsg)
{
rsRetVal iRet = RS_RET_OK;
iminternal_t *pThis =
((void *)0)
;
struct timespec to;
int r;
int is_locked = 0;
to.tv_sec = time(
((void *)0)
) + 1;
to.tv_nsec = 0;
r = pthread_mutex_timedlock(&mutList, &to);
if(r != 0) {
r_dbgprintf("iminternal.c", "iminternalAddMsg: timedlock for mutex failed with %d, msg %s\n", r, getMSG(pMsg))
;
msgDestruct(&pMsg);
do { iRet = RS_RET_ERR; goto finalize_it; } while (0);
}
is_locked = 1;
if((iRet = iminternalConstruct(&pThis)) != RS_RET_OK) goto finalize_it;
pThis->pMsg = pMsg;
if((iRet = llAppend(&llMsgs,
((void *)0)
, (void*) pThis)) != RS_RET_OK) goto finalize_it;
if(((unsigned) __sync_fetch_and_and(&(bHaveMainQueue), 0xffffffff))) {
if(Debug) { r_dbgprintf("iminternal.c", "signaling new internal message via SIGTTOU: '%s'\n", pThis->pMsg->pszRawMsg); }
;
kill(glbl_ourpid,
22
);
}
finalize_it:
if(is_locked) {
pthread_mutex_unlock(&mutList);
}
if(iRet != RS_RET_OK) {
r_dbgprintf("iminternal.c", "iminternalAddMsg() error %d - can not otherwise report this error, message lost\n", iRet);
if(pThis !=
((void *)0)
)
iminternalDestruct(pThis);
}
return iRet;
}
| int iminternalAddMsg(long param_1)
{
time_t tVar1;
undefined8 uVar2;
long in_FS_OFFSET;
long local_50 [2];
int local_3c;
int local_38;
int local_34;
long *local_30;
timespec local_28;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_3c = 0;
local_30 = (long *)0x0;
local_38 = 0;
local_50[0] = param_1;
tVar1 = time((time_t *)0x0);
local_28.tv_sec = tVar1 + 1;
local_28.tv_nsec = 0;
local_34 = pthread_mutex_timedlock((pthread_mutex_t *)mutList,&local_28);
if (local_34 == 0) {
local_38 = 1;
local_3c = iminternalConstruct(&local_30);
if (local_3c == 0) {
*local_30 = local_50[0];
local_3c = llAppend(llMsgs,0,local_30);
if ((local_3c == 0) && (LOCK(), bHaveMainQueue != 0)) {
if (Debug != 0) {
r_dbgprintf("iminternal.c","signaling new internal message via SIGTTOU: \'%s\'\n",
*(undefined8 *)(*local_30 + 0x70));
}
kill(glbl_ourpid,0x16);
}
}
}
else {
uVar2 = getMSG(local_50[0]);
r_dbgprintf("iminternal.c","iminternalAddMsg: timedlock for mutex failed with %d, msg %s\n",
local_34,uVar2);
msgDestruct(local_50);
local_3c = -3000;
}
if (local_38 != 0) {
pthread_mutex_unlock((pthread_mutex_t *)mutList);
}
if ((local_3c != 0) &&
(r_dbgprintf("iminternal.c",
"iminternalAddMsg() error %d - can not otherwise report this error, message lost\n"
,local_3c), local_30 != (long *)0x0)) {
iminternalDestruct(local_30);
}
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return local_3c;
}
__stack_chk_fail();
}
|
static void handler(int s)
{
signo[s] = 1;
}
| long long handler(unsigned long a0) {
*((4 * a0 + &signo)) = 1;
return &signo;
}
|
static void
xattr_acls_a_coder (struct tar_stat_info const *st , char const *keyword,
struct xheader *xhdr, void const *data)
{
xheader_print_n (xhdr, keyword, st->acls_a_ptr, st->acls_a_len);
}
| long long xattr_acls_a_coder(unsigned long long a0[9], unsigned long a1, void* a2, unsigned long a3) {
unsigned long v0;
v0 = a3;
return xheader_print_n(a2, a1, a0[7], a0[8]);
}
|
static
_Bool
parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *username;
if (collect_arg (argv, arg_ptr, &username))
{
struct predicate *our_pred;
uid_t uid;
struct passwd *cur_pwd = getpwnam (username);
endpwent ();
if (cur_pwd !=
((void *)0)
)
{
uid = cur_pwd->pw_uid;
}
else
{
const size_t uid_len = strspn (username, "0123456789");
if (uid_len && (username[uid_len]==0))
{
uid = safe_atoi (username, options.err_quoting_style);
}
else
{
if (username[0])
{
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"%s is not the name of a known user\"), quotearg_n_style (0, options.err_quoting_style, username)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("%s is not the name of a known user"), quotearg_n_style (0, options.err_quoting_style, username)), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("%s is not the name of a known user"), quotearg_n_style (0, options.err_quoting_style, username)), ((
0
) ? (void) 0 : __builtin_unreachable ()))))
;
}
else
{
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"The argument to -user should not be empty\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("The argument to -user should not be empty")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("The argument to -user should not be empty")), ((
0
) ? (void) 0 : __builtin_unreachable ()))))
;
}
return
0
;
}
}
our_pred = insert_primary (entry, username);
our_pred->args.uid = uid;
our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
return
1
;
}
return
0
;
}
| long long parse_user(unsigned long long a0, unsigned long long a1, unsigned long long a2) {
unsigned int v0;
char v1;
struct_0 *v2;
unsigned long long v3;
unsigned int v4[15];
unsigned long long v6;
unsigned long long v7;
unsigned int v8;
if (!collect_arg(a1, a2, &v1)) {
v6 = 0;
LABEL_40410a:
return v6;
}
v2 = &getpwnam(*(&v1))->pw_name;
endpwent();
if (v2) {
v0 = v2->field_10;
goto LABEL_4040b6;
} else {
v3 = strspn(*(&v1), "0123456789");
if (v3 && !*((v3 + *(&v1)))) {
v0 = safe_atoi(*(&v1), *(&g_500074), *(&g_500074));
LABEL_4040b6:
*(&v4[0]) = insert_primary(a0, *(&v1), *(&v1));
v4[14] = v0;
if (v4[14] <= 99)
v8 = 4489188110487089316;
else
v8 = 4561245704505052365;
v4[9] = v8;
v6 = 1;
goto LABEL_40410a;
}
if (!*(*(&v1)))
error(0x1, 0x0, gettext("The argument to -user should not be empty"));
v7 = quotearg_n_style(0x0, *(&g_500074), *(&v1));
error(0x1, 0x0, gettext("%s is not the name of a known user"));
}
}
|
int
permitopen_port(const char *p)
{
int port;
if (strcmp(p, "*") == 0)
return 0;
if ((port = a2port(p)) > 0)
return port;
return -1;
}
| long long permitopen_port(char *a0) {
unsigned int v0;
unsigned long long v3;
if (!strcmp(a0, "*")) {
v3 = 0;
} else {
v0 = a2port(a0);
if (v0 > 0)
v3 = v0;
else
v3 = 4294967295;
}
return v3;
}
|
char *
nvis(char *mbdst, size_t dlen, int c, int flags, int nextc)
{
char cc[2];
int ret;
cc[0] = c;
cc[1] = nextc;
ret = istrsenvisx(&mbdst, &dlen, cc, 1, flags, "",
((void *)0)
);
if (ret < 0)
return
((void *)0)
;
return mbdst + ret;
}
| long nvis(long param_1,undefined8 param_2,undefined param_3,undefined4 param_4,undefined param_5)
{
long lVar1;
long in_FS_OFFSET;
undefined8 local_28;
long local_20;
int local_18;
undefined local_12;
undefined local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = param_2;
local_20 = param_1;
local_12 = param_3;
local_11 = param_5;
local_18 = istrsenvisx(&local_20,&local_28,&local_12,1,param_4,&DAT_001018dc,0);
if (local_18 < 0) {
lVar1 = 0;
}
else {
lVar1 = local_18 + local_20;
}
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return lVar1;
}
|
static void
list_entries_users (size_t n, const STRUCT_UTMP *this)
{
char **u = xnmalloc (n, sizeof *u);
size_t i;
size_t n_entries = 0;
while (n--)
{
if ((((this)->
ut_user
)[0] && (((this)->ut_type == (
7
)) || (0 && ((this)->ut_tv.tv_sec) != 0))))
{
char *trimmed_name;
trimmed_name = extract_trimmed_name (this);
u[n_entries] = trimmed_name;
++n_entries;
}
this++;
}
qsort (u, n_entries, sizeof (u[0]), userid_compare);
for (i = 0; i < n_entries; i++)
{
char c = (i < n_entries - 1 ? ' ' : '\n');
fputs_unlocked (u[i],
stdout
);
putchar_unlocked (c);
}
for (i = 0; i < n_entries; i++)
free (u[i]);
free (u);
}
| void list_entries_users(long a1, long a2)
{
char v3;
long v5;
char v6;
unsigned long i;
size_t j;
size_t nmemb;
_QWORD *base;
v5 = a1;
base = (_QWORD *)xnmalloc(a1, 8LL);
nmemb = 0LL;
while ( v5-- )
{
if ( *(_BYTE *)(a2 + 44) && *(_WORD *)a2 == 7 )
base[nmemb++] = extract_trimmed_name(a2);
a2 += 384LL;
}
qsort(base, nmemb, 8uLL, (__compar_fn_t)userid_compare);
for ( i = 0LL; i < nmemb; ++i )
{
if ( i >= nmemb - 1 )
v3 = 10;
else
v3 = 32;
v6 = v3;
fputs_unlocked((const char *)base[i], stdout);
putchar_unlocked(v6);
}
for ( j = 0LL; j < nmemb; ++j )
free((void *)base[j]);
free(base);
}
|
DH *
mm_choose_dh(int min, int nbits, int max)
{
return (
((void *)0)
);
}
| long long mm_choose_dh(unsigned long a0, unsigned long a1, unsigned long a2) {
unsigned int v0;
unsigned int v1;
unsigned int v2;
v2 = a0;
v1 = a1;
v0 = a2;
return 0;
}
|
static void
mux_session_confirm(struct ssh *ssh, int id, int success, void *arg)
{
struct mux_session_confirm_ctx *cctx = arg;
const char *display;
Channel *c, *cc;
int i, r;
struct sshbuf *reply;
if (cctx ==
((void *)0)
)
sshfatal("mux.c", __func__, 1351, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "cctx == NULL");
if ((c = channel_by_id(ssh, id)) ==
((void *)0)
)
sshfatal("mux.c", __func__, 1353, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "no channel for id %d", id);
if ((cc = channel_by_id(ssh, c->ctl_chan)) ==
((void *)0)
)
sshfatal("mux.c", __func__, 1355, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "channel %d lacks control channel %d", id, c->ctl_chan)
;
if ((reply = sshbuf_new()) ==
((void *)0)
)
sshfatal("mux.c", __func__, 1358, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "sshbuf_new");
if (!success) {
sshlog("mux.c", __func__, 1361, 1, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "sending failure reply");
reply_error(reply, 0x80000003, cctx->rid,
"Session open refused by peer");
goto done;
}
display = getenv("DISPLAY");
if (cctx->want_x_fwd && options.forward_x11 && display !=
((void *)0)
) {
char *proto, *data;
if (client_x11_get_proto(ssh, display, options.xauth_location,
options.forward_x11_trusted, options.forward_x11_timeout,
&proto, &data) == 0) {
sshlog("mux.c", __func__, 1376, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "Requesting X11 forwarding with authentication " "spoofing.")
;
x11_request_forwarding_with_spoofing(ssh, id,
display, proto, data, 1);
client_expect_confirm(ssh, id, "X11 forwarding",
CONFIRM_WARN);
}
}
if (cctx->want_agent_fwd && options.forward_agent) {
sshlog("mux.c", __func__, 1387, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "Requesting authentication agent forwarding.");
channel_request_start(ssh, id, "auth-agent-req@openssh.com", 0);
if ((r = sshpkt_send(ssh)) != 0)
sshfatal("mux.c", __func__, 1390, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "send");
}
client_session2_setup(ssh, id, cctx->want_tty, cctx->want_subsys,
cctx->term, &cctx->tio, c->rfd, cctx->cmd, cctx->env);
sshlog("mux.c", __func__, 1396, 1, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "sending success reply");
if ((r = sshbuf_put_u32(reply, 0x80000006)) != 0 ||
(r = sshbuf_put_u32(reply, cctx->rid)) != 0 ||
(r = sshbuf_put_u32(reply, c->self)) != 0)
sshfatal("mux.c", __func__, 1401, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "reply");
done:
if ((r = sshbuf_put_stringb(cc->output, reply)) != 0)
sshfatal("mux.c", __func__, 1406, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "enqueue");
sshbuf_free(reply);
if (cc->mux_pause <= 0)
sshfatal("mux.c", __func__, 1410, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "mux_pause %d", cc->mux_pause);
cc->mux_pause = 0;
c->open_confirm_ctx =
((void *)0)
;
sshbuf_free(cctx->cmd);
free(cctx->term);
if (cctx->env !=
((void *)0)
) {
for (i = 0; cctx->env[i] !=
((void *)0)
; i++)
free(cctx->env[i]);
free(cctx->env);
}
free(cctx);
}
| long long mux_session_confirm(unsigned long long a0, unsigned long long a1, unsigned long long a2, struct_0 *a3) {
unsigned int v0;
unsigned int v1;
char v2;
char v3;
struct_2 *v4;
struct_1 *v5;
unsigned long long v6;
unsigned long v7;
unsigned long long v8;
unsigned long v9;
char v10;
unsigned long long v11;
unsigned long long v12;
unsigned long long v13;
unsigned long long v14;
if (!a3)
sshfatal("mux.c", "mux_session_confirm", 0x547, 0x1, 0x1, 0x0, "cctx == NULL");
v4 = channel_by_id(a0, a1, a1);
if (!v4) {
v9 = a1;
v8 = "no channel for id %d";
sshfatal("mux.c", "mux_session_confirm", 0x549, 0x1, 0x1, 0x0, *(&v10));
}
v5 = channel_by_id(a0, v4->field_44, v4->field_44);
if (!v5) {
v8 = v4->field_44;
v7 = a1;
v6 = "channel %d lacks control channel %d";
sshfatal("mux.c", "mux_session_confirm", 0x54b, 0x1, 0x1, 0x0, *(&v10));
}
v6 = sshbuf_new(a0, a1, a2, a3, v13, v14);
if (!v6) {
v8 = "sshbuf_new";
sshfatal("mux.c", "mux_session_confirm", 0x54e, 0x1, 0x1, 0x0, *(&v10));
}
if (!a2) {
v8 = "sending failure reply";
sshlog("mux.c", "mux_session_confirm", 0x551, 0x1, 0x7, 0x0, *(&v10));
reply_error(v6, 0x80000003, a3->field_68, "Session open refused by peer");
} else {
v7 = getenv("DISPLAY");
if (a3->field_8 && __stack_chk_fail && v7) {
v8 = &v3;
if (!client_x11_get_proto(a0, v7, ssh_err, sshbuf_get_u32, g_50006c, &v2)) {
v8 = "Requesting X11 forwarding with authentication spoofing.";
sshlog("mux.c", "mux_session_confirm", 0x560, 0x0, 0x5, 0x0, *(&v10));
x11_request_forwarding_with_spoofing(a0, a1, v7, *(&v2), *(&v3), 0x1);
client_expect_confirm(a0, a1, "X11 forwarding", 0x0);
}
}
if (a3->field_c && options) {
v8 = "Requesting authentication agent forwarding.";
sshlog("mux.c", "mux_session_confirm", 0x56b, 0x0, 0x5, 0x0, *(&v10));
channel_request_start(a0, a1, "auth-agent-req@openssh.com", 0x0);
v1 = sshpkt_send(a0);
if (v1) {
v8 = "send";
sshfatal("mux.c", "mux_session_confirm", 0x56e, 0x1, 0x1, ssh_err(v1), *(&v10));
}
}
v8 = a3->field_60;
v7 = a3->field_10;
v6 = v4->field_1c;
client_session2_setup(a0, a1, a3->field_0, a3->field_4, a3->field_18, &a3->padding_20, *(&v10), v11);
v12 = "sending success reply";
sshlog("mux.c", "mux_session_confirm", 0x574, 0x1, 0x7, 0x0, *(&v10));
v1 = sshbuf_put_u32(v6, 0x80000006);
if (!v1) {
v1 = sshbuf_put_u32(v6, a3->field_68);
if (!v1)
v1 = sshbuf_put_u32(v6, v4->field_4);
}
if (v1 || v1 || v1) {
v8 = "reply";
sshfatal("mux.c", "mux_session_confirm", 0x579, 0x1, 0x1, ssh_err(v1), *(&v10));
}
}
v1 = sshbuf_put_stringb(v5->field_70, v6, v6);
if (v1) {
v8 = "enqueue";
sshfatal("mux.c", "mux_session_confirm", 0x57e, 0x1, 0x1, ssh_err(v1), *(&v10));
}
sshbuf_free(v6);
if (v5->field_158 <= 0) {
v9 = v5->field_158;
v8 = "mux_pause %d";
sshfatal("mux.c", "mux_session_confirm", 0x582, 0x1, 0x1, 0x0, *(&v10));
}
v5->field_158 = 0;
v4->field_d8 = 0;
sshbuf_free(a3->field_10);
free(a3->field_18);
if (a3->field_60) {
for (v0 = 0; *((a3->field_60 + (v0 << 3))); v0 = __addvsi3(v0, 0x1)) {
free(*((a3->field_60 + v0 * 8)));
}
free(a3->field_60);
}
free(a3);
return 0;
}
|
Keymap
rl_make_keymap (void)
{
register int i;
Keymap newmap;
newmap = rl_make_bare_keymap ();
for (i = ' '; i < 127; i++)
newmap[i].function = rl_insert;
newmap['\t'].function = rl_insert;
newmap[0x7f].function = rl_rubout;
newmap[(('H') & 0x1f)].function = rl_rubout;
for (i = 128; i < 256; i++)
newmap[i].function = rl_insert;
return (newmap);
}
| long long rl_make_keymap() {
unsigned long long v0[256];
unsigned long long v2;
unsigned long long v3;
v0[0] = rl_make_bare_keymap();
for (v2 = 32; v2 <= 126; v2 = v2 + 1) {
v0[1 + 2 * v2] = got.rl_insert;
}
v0[19] = got.rl_insert;
v0[255] = got.rl_rubout;
v0[9007199254740991 + 239] = got.rl_rubout;
for (v3 = 128; v3 <= 255; v3 = v3 + 1) {
v0[1 + 2 * v3] = got.rl_insert;
}
return v0;
}
|
static char *
scan_escape(char *c)
{
char *h =
((void *)0)
;
char b[5];
INTDEF *intd;
int exoutputp, exskipescape;
int i, j;
intresult = 0;
switch (*c) {
case 'e':
h = "\\";
curpos++;
break;
case '0':
case ' ':
h = " ";
curpos++;
break;
case '|':
h = "";
break;
case '"':
while (*c && *c++!='\n');
c--;
h = "";
break;
case '$':
if (argument) {
c++;
i = (*c - '1');
if (!(h = argument[i]))
h = "";
}
break;
case 'z':
c++;
if (*c == '\\') {
c = scan_escape(c + 1);
c--;
h = "";
} else {
b[0] = *c;
b[1] = '\0';
h = "";
}
break;
case 'k':
c++;
if (*c == '(')
c += 2;
case '^':
case '!':
case '%':
case 'a':
case 'd':
case 'r':
case 'u':
case '\n':
case '&':
h = "";
break;
case '(':
c++;
i = c[0] * 256 + c[1];
c++;
h = expand_char(i);
break;
case '*':
c++;
if (*c == '(') {
c++;
i = c[0] * 256 + c[1];
c++;
} else
i = *c * 256 + ' ';
h = expand_string(i);
break;
case 'f':
c++;
if (*c == '\\') {
c++;
c = scan_escape(c);
c--;
i = intresult;
} else if (*c != '(')
i = *c;
else {
c++;
i = c[0] * 256 + c[1];
c++;
}
if (!skip_escape)
h = change_to_font(i);
else
h = "";
break;
case 's':
c++;
j = 0;
i = 0;
if (*c == '-') {
j = -1;
c++;
} else if (*c == '+') {
j = 1;
c++;
}
if (*c == '0')
c++;
else if (*c == '\\') {
c++;
c = scan_escape(c);
i = intresult;
if (!j)
j = 1;
} else
while (
((*__ctype_b_loc ())[(int) ((
*c
))] & (unsigned short int) _ISdigit)
&& (!i || (!j && i < 4)))
i = i * 10 + (*c++) - '0';
if (!j) {
j = 1;
if (i)
i = i - 10;
}
if (!skip_escape)
h = change_to_size(i * j);
else
h = "";
c--;
break;
case 'n':
c++;
j = 0;
switch (*c) {
case '+':
j = 1;
c++;
break;
case '-':
j = -1;
c++;
break;
default:
break;
}
if (*c == '(') {
c++;
i = ((c[0])*256+(c[1]));
c = c + 1;
} else {
i = ((c[0])*256+(' '));
}
intd = intdef;
while (intd && intd->nr != i)
intd = intd->next;
if (intd) {
intd->val = intd->val + j * intd->incr;
intresult = intd->val;
} else {
switch (i) {
case (('.')*256+('s')):
intresult = current_size;
break;
case (('.')*256+('f')):
intresult = current_font;
break;
default:
intresult = 0;
break;
}
}
h = "";
break;
case 'w':
c++;
i = *c;
c++;
exoutputp = output_possible;
exskipescape = skip_escape;
output_possible = 0;
skip_escape = 1;
j = 0;
while (*c != i) {
j++;
if (*c == escapesym)
c = scan_escape(c + 1);
else
c++;
}
output_possible = exoutputp;
skip_escape = exskipescape;
intresult = j;
break;
case 'l':
h = "<HR>";
curpos = 0;
case 'b':
case 'v':
case 'x':
case 'o':
case 'L':
case 'h':
c++;
i = *c;
c++;
exoutputp = output_possible;
exskipescape = skip_escape;
output_possible = 0;
skip_escape = 1;
while (*c != i)
if (*c == escapesym)
c = scan_escape(c + 1);
else
c++;
output_possible = exoutputp;
skip_escape = exskipescape;
break;
case 'c':
no_newline_output = 1;
break;
case '{':
newline_for_fun++;
h = "";
break;
case '}':
if (newline_for_fun)
newline_for_fun--;
h = "";
break;
case 'p':
h = "<BR>\n";
curpos = 0;
break;
case 't':
h = "\t";
curpos = (curpos + 8) & 0xfff8;
break;
case '<':
h = "<";
curpos++;
break;
case '>':
h = ">";
curpos++;
break;
case '\\':
if (single_escape) {
c--;
break;
}
default:
b[0] = *c;
b[1] = 0;
h = b;
curpos++;
break;
}
c++;
if (!skip_escape)
out_html(h);
return c;
}
| int scan_escape(unsigned long a0) {
char *v0;
int tmp_9;
int tmp_65;
unsigned int v1;
unsigned int v2;
unsigned int v3;
unsigned int v4;
unsigned long long v5;
struct_0 *v6;
char v7;
char v8;
unsigned int v12;
unsigned int v14;
v0 = a0;
v5 = 0;
intresult = 0;
switch (*(v0)) {
case 32: case 48:
v5 = " ";
curpos = curpos + 1;
break;
case 34:
while (*(v0)) {
tmp_9 = v0;
v0 += 1;
if (*(tmp_9) == 10)
break;
}
v0 += 1;
v5 = &g_41026c;
break;
case 36:
if (argument) {
v0 += 1;
v1 = *(v0) - 49;
v5 = *((argument + v1 * 8));
if (!v5)
v5 = &g_41026c;
}
break;
case 40:
v0 += 1;
v1 = v0[1] + (v0[0] * 0x100);
v0 += 1;
v5 = expand_char(v1);
break;
case 42:
v0 += 1;
if (*(v0) == 40) {
v0 += 1;
v1 = v0[1] + (v0[0] * 0x100);
v0 += 1;
} else {
v1 = (v0[0] * 0x100) + 32;
}
v5 = expand_string(v1);
break;
case 60:
v5 = "<";
curpos = curpos + 1;
break;
case 62:
v5 = ">";
curpos = curpos + 1;
break;
case 92:
if (single_escape) {
v0 += 1;
break;
}
case 99:
no_newline_output = 1;
break;
case 101:
v5 = "\\";
curpos = curpos + 1;
break;
case 102:
v0 += 1;
if (*(v0) == 92) {
v0 += 1;
v0 = scan_escape(v0);
v0 += 1;
v1 = intresult;
} else if (*(v0) != 40) {
v1 = *(v0);
} else {
v0 += 1;
v1 = v0[1] + (v0[0] * 0x100);
v0 += 1;
}
if (!skip_escape) {
v5 = change_to_font(v1);
break;
} else {
v5 = &g_41026c;
break;
}
case 110:
v0 += 1;
v2 = 0;
if (*(v0) == 43) {
v2 = 1;
v0 += 1;
} else if (*(v0) == 45) {
v2 = -1;
v0 += 1;
}
if (*(v0) == 40) {
v0 += 1;
v1 = v0[1] + (v0[0] * 0x100);
v0 += 1;
} else {
v1 = (v0[0] * 0x100) + 32;
}
for (v6 = intdef; v6; v6 = v6->field_10) {
if (v1 == v6->field_0)
break;
}
if (v6) {
v6->field_4 = v6->field_4 + v2 * v6->field_8;
intresult = v6->field_4;
} else if (v1 == 11878) {
intresult = current_font;
} else if (v1 == 11891) {
intresult = current_size;
} else {
intresult = 0;
}
v5 = &g_41026c;
break;
case 112:
v5 = "<BR>\n";
curpos = 0;
break;
case 115:
v0 += 1;
v2 = 0;
v1 = 0;
if (*(v0) == 45) {
v2 = -1;
v0 += 1;
} else if (*(v0) == 43) {
v2 = 1;
v0 += 1;
}
if (*(v0) == 48) {
v0 += 1;
} else if (*(v0) == 92) {
v0 += 1;
v0 = scan_escape(v0);
v1 = intresult;
if (!v2)
v2 = 1;
} else {
while (true) {
v12 = *((*(v0) * 2 + *(__ctype_b_loc()))) & 0x800;
if (!v12)
break;
if (v1) {
if (v2)
break;
if (!v2) {
if (v1 > 3)
break;
}
}
tmp_65 = v0;
v0 += 1;
v14 = *(tmp_65) + ((v1 * 4) + v1) * 2 - 48;
v1 = v14;
}
}
if (!v2) {
v2 = 1;
if (v1)
v1 -= 10;
}
if (!skip_escape)
v5 = change_to_size(v2 * v1);
else
v5 = &g_41026c;
v0 += 1;
break;
case 116:
v5 = "\t";
curpos = curpos + 8 & 65528;
break;
case 119:
v0 += 1;
v1 = *(v0);
v0 += 1;
v3 = output_possible;
v4 = skip_escape;
output_possible = 0;
skip_escape = 1;
v2 = 0;
while (v1 != *(v0)) {
v2 += 1;
if (*(v0) == escapesym)
v0 = scan_escape(v0 + 1);
else
v0 += 1;
}
output_possible = v3;
skip_escape = v4;
intresult = v2;
break;
case 122:
v0 += 1;
if (*(v0) == 92) {
v0 = scan_escape(v0 + 1);
v0 += 1;
v5 = &g_41026c;
break;
} else {
v7 = *(v0);
v8 = 0;
v5 = &g_41026c;
break;
}
case 123:
newline_for_fun = newline_for_fun + 1;
v5 = &g_41026c;
break;
case 124:
v5 = &g_41026c;
break;
case 125:
if (newline_for_fun)
newline_for_fun = newline_for_fun - 1;
v5 = &g_41026c;
break;
case 107:
v0 += 1;
if (*(v0) == 40)
v0 += 2;
case 10: case 33: case 37: case 38: case 94: case 97: case 100: case 114: case 117:
v5 = &g_41026c;
break;
case 108:
v5 = "<HR>";
curpos = 0;
case 76: case 98: case 104: case 111: case 118: case 120:
v0 += 1;
v1 = *(v0);
v0 += 1;
v3 = output_possible;
v4 = skip_escape;
output_possible = 0;
skip_escape = 1;
while (v1 != *(v0)) {
if (*(v0) == escapesym)
v0 = scan_escape(v0 + 1);
else
v0 += 1;
}
output_possible = v3;
skip_escape = v4;
break;
default:
v7 = *(v0);
v8 = 0;
v5 = &v7;
curpos = curpos + 1;
break;
}
v0 += 1;
if (!skip_escape)
out_html(v5);
return v0;
}
|
static void usage (int status)
{
FILE *usageout = (0 != status) ?
stderr
:
stdout
;
(void) fprintf (usageout,
gettext ("Usage: %s [options]\n" "\n" "Options:\n")
,
Prog);
(void) fputs (gettext (" -h, --help display this help message and exit\n"), usageout);
(void) fputs (gettext (" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
(void) fputs ("\n", usageout);
exit (status);
}
| void usage(unsigned long a0) {
void* v0;
unsigned long v1;
unsigned long v3;
void* v4;
v1 = v3;
if (a0)
v4 = stderr;
else
v4 = stdout;
v0 = v4;
fprintf(v0, gettext("Usage: %s [options]\n\nOptions:\n"));
fputs(gettext(" -h, --help display this help message and exit\n"), v0);
fputs(gettext(" -R, --root CHROOT_DIR directory to chroot into\n"), v0);
fputs("\n", v0);
exit(a0);
}
|
static inline void
emit_ancillary_info (char const *program)
{
struct infomap { char const *program; char const *node; } const infomap[] = {
{ "[", "test invocation" },
{ "coreutils", "Multi-call invocation" },
{ "sha224sum", "sha2 utilities" },
{ "sha256sum", "sha2 utilities" },
{ "sha384sum", "sha2 utilities" },
{ "sha512sum", "sha2 utilities" },
{
((void *)0)
,
((void *)0)
}
};
char const *node = program;
struct infomap const *map_prog = infomap;
while (map_prog->program && ! (strcmp (program, map_prog->program) == 0))
map_prog++;
if (map_prog->node)
node = map_prog->node;
printf (gettext ("\n%s online help: <%s>\n"), "GNU coreutils", "https:
char const *lc_messages = setlocale (
5
,
((void *)0)
);
if (lc_messages && strncmp (lc_messages, "" "en_" "", sizeof ("en_") - 1))
{
fputs_unlocked (gettext ("Report any translation bugs to " "<https:
stdout
)
;
}
char const *url_program = (strcmp (program, "[") == 0) ? "test" : program;
printf (gettext ("Full documentation <%s%s>\n"),
"https:
printf (gettext ("or available locally via: info '(coreutils) %s%s'\n"),
node, node == program ? " invocation" : "");
}
| void emit_ancillary_info(char *param_1)
{
FILE *__stream;
int iVar1;
char *pcVar2;
char *pcVar3;
long in_FS_OFFSET;
char *local_b8;
char **local_b0;
char *local_98;
char *local_90;
char *local_88;
char *local_80;
char *local_78;
char *local_70;
char *local_68;
char *local_60;
char *local_58;
char *local_50;
char *local_48;
char *local_40;
undefined8 local_38;
undefined8 local_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_98 = "[";
local_90 = "test invocation";
local_88 = "coreutils";
local_80 = "Multi-call invocation";
local_78 = "sha224sum";
local_70 = "sha2 utilities";
local_68 = "sha256sum";
local_60 = "sha2 utilities";
local_58 = "sha384sum";
local_50 = "sha2 utilities";
local_48 = "sha512sum";
local_40 = "sha2 utilities";
local_38 = 0;
local_30 = 0;
local_b0 = &local_98;
while ((*local_b0 != (char *)0x0 && (iVar1 = strcmp(param_1,*local_b0), iVar1 != 0))) {
local_b0 = local_b0 + 2;
}
local_b8 = param_1;
if (local_b0[1] != (char *)0x0) {
local_b8 = local_b0[1];
}
pcVar2 = (char *)gettext("\n%s online help: <%s>\n");
printf(pcVar2,"GNU coreutils","https:
pcVar2 = setlocale(5,(char *)0x0);
if ((pcVar2 != (char *)0x0) && (iVar1 = strncmp(pcVar2,"en_",3), __stream = stdout, iVar1 != 0)) {
pcVar2 = (char *)gettext(
"Report any translation bugs to <https:
);
fputs_unlocked(pcVar2,__stream);
}
iVar1 = strcmp(param_1,"[");
pcVar2 = param_1;
if (iVar1 == 0) {
pcVar2 = "test";
}
pcVar3 = (char *)gettext("Full documentation <%s%s>\n");
printf(pcVar3,"https:
if (local_b8 == param_1) {
pcVar2 = " invocation";
}
else {
pcVar2 = "";
}
pcVar3 = (char *)gettext("or available locally via: info \'(coreutils) %s%s\'\n");
printf(pcVar3,local_b8,pcVar2);
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return;
}
__stack_chk_fail();
}
|
static int session_nlmsg(struct nlmsghdr *n, void *arg)
{
int ret = get_response(n, arg);
if (ret == 0)
print_session(arg);
return ret;
}
| long long session_nlmsg(void* a0, unsigned long a1, unsigned int a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) {
unsigned int v0;
v0 = get_response(a0, a1);
if (!v0)
print_session(a1, a1, a2, a3, a4, a5);
return v0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.