input
stringlengths
28
169k
output
stringlengths
20
317k
int sshkey_check_cert_sigtype(const struct sshkey *key, const char *allowed) { if (key == ((void *)0) || allowed == ((void *)0) ) return -10; if (!sshkey_type_is_cert(key->type)) return 0; if (key->cert == ((void *)0) || key->cert->signature_type == ((void *)0) ) return -10; if (match_pattern_list(key->cert->signature_type, allowed, 0) != 1) return -58; return 0; }
int sshkey_check_cert_sigtype(struct_0 *a0, unsigned long long a1) { unsigned int v1; if (!a0) { LABEL_4062c3: v1 = -10; } else { if (!a1) goto LABEL_4062c3; if (!sshkey_type_is_cert(a0->field_0)) { v1 = 0; } else if (!a0->field_80) { LABEL_406306: v1 = -10; } else { if (!a0->field_80->field_58) goto LABEL_406306; if (match_pattern_list(a0->field_80->field_58, a1, 0x0) != 1) v1 = -58; else v1 = 0; } } return v1; }
static _Bool edit (struct line_filter *left, char const *lname, lin lline, lin llen, struct line_filter *right, char const *rname, lin rline, lin rlen, FILE *outfile) { for (;;) { int cmd0 ; int cmd1 ; _Bool gotcmd = 0 ; while (! gotcmd) { if (putchar_unlocked ('%') != '%') perror_fatal (gettext ("write failed")); ck_fflush ( stdout ); cmd0 = skip_white (); switch (cmd0) { case '1': case '2': case 'l': case 'r': case 's': case 'v': case 'q': if (skip_white () != '\n') { give_help (); flush_line (); continue; } gotcmd = 1 ; break; case 'e': cmd1 = skip_white (); switch (cmd1) { case '1': case '2': case 'b': case 'd': case 'l': case 'r': if (skip_white () != '\n') { give_help (); flush_line (); continue; } gotcmd = 1 ; break; case '\n': gotcmd = 1 ; break; default: give_help (); flush_line (); continue; } break; case (-1) : if (feof_unlocked ( stdin )) { gotcmd = 1 ; cmd0 = 'q'; break; } __attribute__ ((__fallthrough__)); default: flush_line (); __attribute__ ((__fallthrough__)); case '\n': give_help (); continue; } } switch (cmd0) { case '1': case 'l': lf_copy (left, llen, outfile); lf_skip (right, rlen); return 1 ; case '2': case 'r': lf_copy (right, rlen, outfile); lf_skip (left, llen); return 1 ; case 's': suppress_common_lines = 1 ; break; case 'v': suppress_common_lines = 0 ; break; case 'q': return 0 ; case 'e': { int fd; if (tmpname) tmp = fopen (tmpname, "w"); else { if ((fd = temporary_file ()) < 0) perror_fatal ("mkstemp"); tmp = fdopen (fd, "w"); } if (! tmp) perror_fatal (tmpname); switch (cmd1) { case 'd': if (llen) { printint l1 = lline; printint l2 = lline + llen - 1; if (llen == 1) fprintf (tmp, "--- %s %""l""d\n", lname, l1); else fprintf (tmp, "--- %s %""l""d,%""l""d\n", lname, l1, l2); } __attribute__ ((__fallthrough__)); case '1': case 'b': case 'l': lf_copy (left, llen, tmp); break; default: lf_skip (left, llen); break; } switch (cmd1) { case 'd': if (rlen) { printint l1 = rline; printint l2 = rline + rlen - 1; if (rlen == 1) fprintf (tmp, "+++ %s %""l""d\n", rname, l1); else fprintf (tmp, "+++ %s %""l""d,%""l""d\n", rname, l1, l2); } __attribute__ ((__fallthrough__)); case '2': case 'b': case 'r': lf_copy (right, rlen, tmp); break; default: lf_skip (right, rlen); break; } ck_fclose (tmp); { int wstatus; int werrno = 0; char const *argv[3]; ignore_SIGINT = 1 ; checksigs (); argv[0] = editor_program; argv[1] = tmpname; argv[2] = 0; { pid_t pid; pid = fork (); if (pid == 0) { execvp (editor_program, (char **) argv); _exit ( (*__errno_location ()) == 2 ? 127 : 126); } if (pid < 0) perror_fatal ("fork"); while (waitpid (pid, &wstatus, 0) < 0) if ( (*__errno_location ()) == 4 ) checksigs (); else perror_fatal ("waitpid"); } ignore_SIGINT = 0 ; check_child_status (werrno, wstatus, 0 , editor_program); } { char buf[((size_t) 65536)]; size_t size; tmp = ck_fopen (tmpname, "r"); while ((size = ck_fread (buf, ((size_t) 65536), tmp)) != 0) { checksigs (); ck_fwrite (buf, size, outfile); } ck_fclose (tmp); } return 1 ; } default: give_help (); break; } } }
undefined8 edit(undefined8 param_1,undefined8 param_2,long param_3,long param_4,undefined8 param_5, undefined8 param_6,long param_7,long param_8,undefined8 param_9) { bool bVar1; undefined *puVar2; int iVar3; __pid_t _Var4; undefined8 uVar5; int *piVar6; undefined *puVar7; long in_FS_OFFSET; int iStack65656; int iStack65652; int iStack65648; int iStack65644; undefined4 uStack65640; __pid_t _Stack65636; long lStack65632; long lStack65624; long lStack65616; long lStack65608; long lStack65600; char *pcStack65592; char *pcStack65584; undefined8 uStack65576; undefined auStack65560 [16]; undefined auStack65544 [65528]; long local_10; puVar2 = &stack0xfffffffffffffff8; do { puVar7 = puVar2; *(undefined8 *)(puVar7 + -0x1000) = *(undefined8 *)(puVar7 + -0x1000); puVar2 = puVar7 + -0x1000; } while (puVar7 + -0x1000 != auStack65544); local_10 = *(long *)(in_FS_OFFSET + 0x28); LAB_001016c6: do { bVar1 = false; LAB_00101890: if (!bVar1) { *(undefined8 *)(puVar7 + -0x10c8) = 0x1016dc; iVar3 = putchar_unlocked(0x25); if (iVar3 != 0x25) { *(undefined8 *)(puVar7 + -0x10c8) = 0x1016ed; uVar5 = gettext("write failed"); *(undefined8 *)(puVar7 + -0x10c8) = 0x1016f5; perror_fatal(uVar5); } *(undefined8 *)(puVar7 + -0x10c8) = 0x101704; ck_fflush(); *(undefined8 *)(puVar7 + -0x10c8) = 0x101709; iStack65652 = skip_white(); if (iStack65652 == 0x76) { LAB_001017a0: *(undefined8 *)(puVar7 + -0x10c8) = 0x1017a5; iVar3 = skip_white(); if (iVar3 == 10) { bVar1 = true; } else { *(undefined8 *)(puVar7 + -0x10c8) = 0x1017af; give_help(); *(undefined8 *)(puVar7 + -0x10c8) = 0x1017b4; flush_line(); } goto LAB_00101890; } if ((0x76 < iStack65652) || (0x73 < iStack65652)) goto LAB_00101885; if ((0x70 < iStack65652) || (iStack65652 == 0x6c)) goto LAB_001017a0; if (0x6c < iStack65652) goto LAB_00101885; if (iStack65652 != 0x65) { if ((0x65 < iStack65652) || (0x32 < iStack65652)) goto LAB_00101885; if (0x30 < iStack65652) goto LAB_001017a0; if (iStack65652 == -1) { *(undefined8 *)(puVar7 + -0x10c8) = 0x10186e; iVar3 = feof_unlocked(stdin); if (iVar3 != 0) { bVar1 = true; iStack65652 = 0x71; goto LAB_00101890; } LAB_00101885: *(undefined8 *)(puVar7 + -0x10c8) = 0x10188a; flush_line(); } else if (iStack65652 != 10) goto LAB_00101885; *(undefined8 *)(puVar7 + -0x10c8) = 0x10188f; give_help(); goto LAB_00101890; } *(undefined8 *)(puVar7 + -0x10c8) = 0x1017ca; iStack65648 = skip_white(); if (iStack65648 < 0x73) { if (iStack65648 < 0x62) { if (iStack65648 != 10) { if ((9 < iStack65648) && (iStack65648 - 0x31U < 2)) goto LAB_00101829; goto LAB_00101851; } LAB_0010185d: bVar1 = true; } else { if ((1 << ((char)iStack65648 + 0x9eU & 0x3f) & 0x10405U) == 0) goto LAB_00101851; LAB_00101829: *(undefined8 *)(puVar7 + -0x10c8) = 0x10182e; iVar3 = skip_white(); if (iVar3 == 10) goto LAB_0010185d; *(undefined8 *)(puVar7 + -0x10c8) = 0x101838; give_help(); *(undefined8 *)(puVar7 + -0x10c8) = 0x10183d; flush_line(); } } else { LAB_00101851: *(undefined8 *)(puVar7 + -0x10c8) = 0x101856; give_help(); *(undefined8 *)(puVar7 + -0x10c8) = 0x10185b; flush_line(); } goto LAB_00101890; } if (0x76 < iStack65652) { switchD_00101901_caseD_66: *(undefined8 *)(puVar7 + -0x10c8) = 0x101e08; give_help(); goto LAB_001016c6; } if (iStack65652 < 0x65) { if (iStack65652 == 0x31) goto switchD_00101901_caseD_6c; if (iStack65652 == 0x32) goto switchD_00101901_caseD_72; goto switchD_00101901_caseD_66; } switch(iStack65652) { case 0x65: goto switchD_00101901_caseD_65; default: goto switchD_00101901_caseD_66; case 0x6c: switchD_00101901_caseD_6c: *(undefined8 *)(puVar7 + -0x10c8) = 0x101924; lf_copy(param_1,param_4,param_9); *(undefined8 *)(puVar7 + -0x10c8) = 0x10193a; lf_skip(param_5,param_8); uVar5 = 1; goto LAB_00101e0e; case 0x71: uVar5 = 0; goto LAB_00101e0e; case 0x72: switchD_00101901_caseD_72: *(undefined8 *)(puVar7 + -0x10c8) = 0x101961; lf_copy(param_5,param_8,param_9); *(undefined8 *)(puVar7 + -0x10c8) = 0x10197a; lf_skip(param_1,param_4); uVar5 = 1; goto LAB_00101e0e; case 0x73: suppress_common_lines = 1; break; case 0x76: suppress_common_lines = 0; } } while( true ); switchD_00101901_caseD_65: if (tmpname == (char *)0x0) { *(undefined8 *)(puVar7 + -0x10c8) = 0x1019d6; iStack65644 = temporary_file(); if (iStack65644 < 0) { *(undefined8 *)(puVar7 + -0x10c8) = 0x1019f1; perror_fatal(); } *(undefined8 *)(puVar7 + -0x10c8) = 0x101a05; tmp = fdopen(iStack65644,"w"); } else { *(undefined8 *)(puVar7 + -0x10c8) = 0x1019c8; tmp = fopen(tmpname,"w"); } if (tmp == (FILE *)0x0) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101a27; perror_fatal(tmpname); } if (iStack65648 == 0x6c) { LAB_00101b16: *(undefined8 *)(puVar7 + -0x10c8) = 0x101b36; lf_copy(param_1,param_4,tmp); } else { if (iStack65648 < 0x6d) { if (iStack65648 == 100) { if (param_4 != 0) { lStack65624 = param_4 + param_3 + -1; lStack65632 = param_3; if (param_4 == 1) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101ae1; fprintf(tmp,"--- %s %ld\n",param_2,param_3); } else { *(undefined8 *)(puVar7 + -0x10c8) = 0x101b16; fprintf(tmp,"--- %s %ld,%ld\n",param_2,param_3,lStack65624); } } } else if ((100 < iStack65648) || ((iStack65648 != 0x31 && (iStack65648 != 0x62)))) goto LAB_00101b38; goto LAB_00101b16; } LAB_00101b38: *(undefined8 *)(puVar7 + -0x10c8) = 0x101b51; lf_skip(param_1,param_4); } if (iStack65648 != 0x72) { if (0x72 < iStack65648) { LAB_00101c51: *(undefined8 *)(puVar7 + -0x10c8) = 0x101c67; lf_skip(param_5,param_8); goto LAB_00101c68; } if (iStack65648 == 100) { if (param_8 != 0) { lStack65616 = param_7; lStack65608 = param_8 + param_7 + -1; if (param_8 == 1) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101bfd; fprintf(tmp,"+++ %s %ld\n",param_6,param_7); } else { *(undefined8 *)(puVar7 + -0x10c8) = 0x101c32; fprintf(tmp,"+++ %s %ld,%ld\n",param_6,param_7,lStack65608); } } } else if ((100 < iStack65648) || ((iStack65648 != 0x32 && (iStack65648 != 0x62)))) goto LAB_00101c51; } *(undefined8 *)(puVar7 + -0x10c8) = 0x101c4f; lf_copy(param_5,param_8,tmp); LAB_00101c68: *(undefined8 *)(puVar7 + -0x10c8) = 0x101c77; ck_fclose(); uStack65640 = 0; ignore_SIGINT = 1; *(undefined8 *)(puVar7 + -0x10c8) = 0x101c8d; checksigs(); pcStack65592 = editor_program; pcStack65584 = tmpname; uStack65576 = 0; *(undefined8 *)(puVar7 + -0x10c8) = 0x101cb9; _Stack65636 = fork(); if (_Stack65636 == 0) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101ce1; execvp(editor_program,&pcStack65592); *(undefined8 *)(puVar7 + -0x10c8) = 0x101ce6; piVar6 = __errno_location(); if (*piVar6 == 2) { iVar3 = 0x7f; } else { iVar3 = 0x7e; } *(undefined8 *)(puVar7 + -0x10c8) = 0x101d00; _exit(iVar3); } if (-1 < _Stack65636) goto LAB_00101d34; *(undefined8 *)(puVar7 + -0x10c8) = 0x101d15; perror_fatal(); do { *(undefined8 *)(puVar7 + -0x10c8) = 0x101d1a; piVar6 = __errno_location(); if (*piVar6 == 4) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101d26; checksigs(); } else { *(undefined8 *)(puVar7 + -0x10c8) = 0x101d34; perror_fatal(); } LAB_00101d34: *(undefined8 *)(puVar7 + -0x10c8) = 0x101d50; _Var4 = waitpid(_Stack65636,&iStack65656,0); } while (_Var4 < 0); ignore_SIGINT = 0; *(undefined8 *)(puVar7 + -0x10c8) = 0x101d7d; check_child_status(uStack65640,iStack65656,0,editor_program); *(undefined8 *)(puVar7 + -0x10c8) = 0x101d93; tmp = (FILE *)ck_fopen(tmpname,&DAT_001031c2); while( true ) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101ddc; lStack65600 = ck_fread(auStack65560,0x10000,tmp); if (lStack65600 == 0) break; *(undefined8 *)(puVar7 + -0x10c8) = 0x101da1; checksigs(); *(undefined8 *)(puVar7 + -0x10c8) = 0x101dc1; ck_fwrite(auStack65560,lStack65600,param_9); } *(undefined8 *)(puVar7 + -0x10c8) = 0x101dfc; ck_fclose(tmp); uVar5 = 1; LAB_00101e0e: if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { *(undefined8 *)(puVar7 + -0x10c8) = 0x101e22; __stack_chk_fail(); } return uVar5; }
int inflateEnd(strm) z_streamp strm; { struct inflate_state *state; if (inflateStateCheck(strm)) return (-2); state = (struct inflate_state *)strm->state; if (state->window != 0) (*((strm)->zfree))((strm)->opaque, (voidpf)(state->window)); (*((strm)->zfree))((strm)->opaque, (voidpf)(strm->state)); strm->state = 0; ; return 0; }
long long inflateEnd(unsigned long long a0[11]) { struct_0 *v0; unsigned long long v2; if (inflateStateCheck(a0)) { v2 = 4294967294; } else { v0 = a0[7]; if (v0->field_48) a0[9](a0[10], v0->field_48, v0->field_48, a0[9]); a0[9](a0[10], a0[7], a0[7], a0[9]); a0[7] = 0; v2 = 0; } return v2; }
static int hextobin (unsigned char c) { switch (c) { default: return c - '0'; case 'a': case 'A': return 10; case 'b': case 'B': return 11; case 'c': case 'C': return 12; case 'd': case 'D': return 13; case 'e': case 'E': return 14; case 'f': case 'F': return 15; } }
int hextobin(byte param_1) { int iVar1; switch(param_1) { case 0x41: case 0x61: iVar1 = 10; break; case 0x42: case 0x62: iVar1 = 0xb; break; case 0x43: case 99: iVar1 = 0xc; break; case 0x44: case 100: iVar1 = 0xd; break; case 0x45: case 0x65: iVar1 = 0xe; break; case 0x46: case 0x66: iVar1 = 0xf; break; default: iVar1 = param_1 - 0x30; } return iVar1; }
static void scan_tree (tree, max_code) ct_data *tree; int max_code; { int n; int prevlen = -1; int curlen; int nextlen = tree[0].dl.len; int count = 0; int max_count = 7; int min_count = 4; if (nextlen == 0) max_count = 138, min_count = 3; tree[max_code+1].dl.len = (ush)0xffff; for (n = 0; n <= max_code; n++) { curlen = nextlen; nextlen = tree[n+1].dl.len; if (++count < max_count && curlen == nextlen) { continue; } else if (count < min_count) { bl_tree[curlen].fc.freq += count; } else if (curlen != 0) { if (curlen != prevlen) bl_tree[curlen].fc.freq++; bl_tree[16].fc.freq++; } else if (count <= 10) { bl_tree[17].fc.freq++; } else { bl_tree[18].fc.freq++; } count = 0; prevlen = curlen; if (nextlen == 0) { max_count = 138, min_count = 3; } else if (curlen == nextlen) { max_count = 6, min_count = 3; } else { max_count = 7, min_count = 4; } } }
long scan_tree(long a1, int a2) { long result; int i; int v4; int v5; int v6; int v7; int v8; int v9; v4 = -1; v5 = *(unsigned short *)(a1 + 2); v6 = 0; v7 = 7; v8 = 4; if ( !*(_WORD *)(a1 + 2) ) { v7 = 138; v8 = 3; } *(_WORD *)(4 * (a2 + 1LL) + a1 + 2) = -1; for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i > a2 ) break; v9 = v5; v5 = *(unsigned short *)(4 * (i + 1LL) + a1 + 2); if ( ++v6 >= v7 || v9 != v5 ) { if ( v6 >= v8 ) { if ( v9 ) { if ( v9 != v4 ) ++*((_WORD *)&bl_tree + 2 * v9); ++word_2E80; } else if ( v6 > 10 ) { ++word_2E88; } else { ++word_2E84; } } else { *((_WORD *)&bl_tree + 2 * v9) += v6; } v6 = 0; v4 = v9; if ( v5 ) { if ( v9 == v5 ) { v7 = 6; v8 = 3; } else { v7 = 7; v8 = 4; } } else { v7 = 138; v8 = 3; } } } return result; }
static void usage(void) { fprintf( stderr , gettext ("usage: %s <pid> <gid> <lowergid> <count> [ <gid> <lowergid> <count> ] ... \n"), Prog); exit( 1 ); }
void usage() { unsigned long v0; unsigned long v2; v0 = v2; fprintf(stderr, gettext("usage: %s <pid> <gid> <lowergid> <count> [ <gid> <lowergid> <count> ] ... \n")); exit(0x1); }
static void check_agent_present(void) { int r; if (options.forward_agent) { if ((r = ssh_get_authentication_socket( ((void *)0) )) != 0) { options.forward_agent = 0; if (r != -47) sshlog("ssh.c", __func__, 2017, 0, SYSLOG_LEVEL_DEBUG1, ssh_err(r), "ssh_get_authentication_socket"); } } }
void check_agent_present() { char v0; unsigned int v1; unsigned long long v3; unsigned long long v5; v3 = 1098421112831; v1 = ssh_get_authentication_socket(0x0); if (v1) { hostaddr = 0; if (v1 != -47) v5 = sshlog("ssh.c", "check_agent_present", 0x7e1, 0x0, 0x5, ssh_err(v1), "ssh_get_authentication_socket", *(&v0)); } return; }
static void slide_hash(s) deflate_state *s; { unsigned n, m; Posf *p; uInt wsize = s->w_size; n = s->hash_size; p = &s->head[n]; do { m = *--p; *p = (Pos)(m >= wsize ? m - wsize : 0); } while (--n); n = wsize; p = &s->prev[n]; do { m = *--p; *p = (Pos)(m >= wsize ? m - wsize : 0); } while (--n); }
void slide_hash(struct_0 *a0) { unsigned int v0; unsigned int v1; unsigned int v2; unsigned short *v3; unsigned short v5; unsigned short v6; unsigned short *v7; v1 = a0->field_50; v0 = a0->field_84; v3 = a0->field_78 + v0 * 2; do { v3 = v3 + 1; v2 = *(v3); if (v2 < v1) v5 = 0; else v5 = v2 - v1; *(v3) = v5; v0 -= 1; } while (v0); v0 = v1; v3 = a0->field_70 + v0 * 2; do { v3 = v3 + 1; v2 = *(v3); if (v2 < v1) v6 = 0; else v6 = v2 - v1; v7 = v3; *(v3) = v6; v0 -= 1; } while (v0); return; }
static void strip(char *data) { int i; int len = strlen(data); for (i = 0; i < len; i++) { if (data[i] == '\r' && data[i + 1] == '\n' && data[i + 2] == 0) { data[i] = '\n'; data[i + 1] = 0; break; } } }
void strip(char *a0) { unsigned int v0; unsigned int v1; unsigned long long v3; unsigned long long v4; v1 = strlen(a0); v0 = 0; while (true) { v3 = v0; if (v0 >= v1) break; if (a0[v0] == 13 && a0[1 + v0] == 10 && !a0[2 + v0]) { a0[v0] = 10; v4 = &a0[1 + v0]; a0[1 + v0] = 0; break; } v0 += 1; } return; }
int tar_timespec_cmp (struct timespec a, struct timespec b) { if (!((1<<(current_format)) & (1<<(POSIX_FORMAT)))) a.tv_nsec = b.tv_nsec = 0; return timespec_cmp (a, b); }
long long tar_timespec_cmp(unsigned long long a0, unsigned long long a1, unsigned long long a2, unsigned long long a3) { void* v0; void* v1; v1 = a1; v0 = a3; if (!((16 >> (current_format & 31)) & 1)) { v0 = 0; v1 = v0; } return timespec_cmp(a0, v1, a2, v0); }
void sys_error (const char *format, ...) { int e; va_list args; e = (*__errno_location ()) ; error_prolog (0); __builtin_va_start( args , format ) ; vfprintf ( stderr , format, args); fprintf ( stderr , ": %s\n", strerror (e)); __builtin_va_end( args ) ; }
long long sys_error() { unsigned int v0; unsigned int v1; unsigned int v2; unsigned long v3; unsigned long v4; unsigned long v5; char v6; unsigned long v7; unsigned long v8; unsigned long v9; unsigned long v10; unsigned long v11; int v12; int v13; int v14; int v15; int v16; int v17; int v18; int v19; unsigned long v20; unsigned long v21; unsigned long v22; unsigned long v23; unsigned long v24; unsigned long v25; char v26; int v27; int v28; int v29; int v30; int v31; int v32; int v33; int v34; unsigned long long *v35; char *v36; v7 = v21; v8 = v22; v9 = v23; v10 = v24; v11 = v25; if (v26) { v12 = v27; v13 = v28; v14 = v29; v15 = v30; v16 = v31; v17 = v32; v18 = v33; v19 = v34; } v5 = v35[5]; v0 = *(__errno_location()); error_prolog(0x0); v1 = 8; v2 = 48; v3 = &v20; v4 = &v6; vfprintf(stderr, v36, &v1); fprintf(stderr, ": %s\n", strerror(v0)); if ((v5 ^ v35[5])) __stack_chk_fail(); return 0; }
static double calc_svar(uint64_t *diffs, unsigned int diffs_size, double avg) { double sum = 0, d; unsigned int i; for (i = 0; i < diffs_size; i++) { d = ((double) diffs[i] - avg); d *= d; sum += d; } sum /= diffs_size - 1; return sum; }
void calc_svar(undefined8 param_1,uint param_2) { uint local_1c; for (local_1c = 0; local_1c < param_2; local_1c = local_1c + 1) { } return; }
static int compare_gps(const void *_p, const void *_q) { const struct glob_path_stat *p = (const struct glob_path_stat *)_p; const struct glob_path_stat *q = (const struct glob_path_stat *)_q; return(strcmp(p->gps_path, q->gps_path)); }
void compare_gps(char **param_1,char **param_2) { strcmp(*param_1,*param_2); return; }
static int searchoutput(struct fsys_namenode *namenode) { struct fsys_node_pkgs_iter *iter; struct pkginfo *pkg_owner; int found; if (namenode->divert) { const char *name_from = namenode->divert->camefrom ? namenode->divert->camefrom->name : namenode->name; const char *name_to = namenode->divert->useinstead ? namenode->divert->useinstead->name : namenode->name; if (namenode->divert->pkgset) { printf(gettext("diversion by %s from: %s\n"), namenode->divert->pkgset->name, name_from); printf(gettext("diversion by %s to: %s\n"), namenode->divert->pkgset->name, name_to); } else { printf(gettext("local diversion from: %s\n"), name_from); printf(gettext("local diversion to: %s\n"), name_to); } } found= 0; iter = fsys_node_pkgs_iter_new(namenode); while ((pkg_owner = fsys_node_pkgs_iter_next(iter))) { if (found) fputs(", ", stdout ); fputs(pkg_name(pkg_owner, pnaw_nonambig), stdout ); found++; } fsys_node_pkgs_iter_free(iter); if (found) printf(": %s\n",namenode->name); return found + (namenode->divert ? 1 : 0); }
long searchoutput(long a1) { long v1; long v2; long v3; char *v4; long v5; char *v6; char *v7; char *v8; long i; FILE *v10; const char *v11; int v13; long v14; long v15; long v16; long v17; if ( *(_QWORD *)(a1 + 24) ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8LL) ) v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 8LL) + 8LL); else v1 = *(_QWORD *)(a1 + 8); v14 = v1; if ( **(_QWORD **)(a1 + 24) ) v2 = *(_QWORD *)(**(_QWORD **)(a1 + 24) + 8LL); else v2 = *(_QWORD *)(a1 + 8); v15 = v2; if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 16LL) ) { v3 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 16LL) + 8LL); v4 = gettext("diversion by %s from: %s\n"); printf(v4, v3, v14); v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 16LL) + 8LL); v6 = gettext("diversion by %s to: %s\n"); printf(v6, v5, v15); } else { v7 = gettext("local diversion from: %s\n"); printf(v7, v14); v8 = gettext("local diversion to: %s\n"); printf(v8, v15); } } v13 = 0; v16 = fsys_node_pkgs_iter_new(a1); for ( i = fsys_node_pkgs_iter_next(v16); ; i = fsys_node_pkgs_iter_next(v16) ) { v17 = i; if ( !i ) break; if ( v13 ) fputs(", ", stdout); v10 = stdout; v11 = (const char *)pkg_name(v17, 1LL); fputs(v11, v10); ++v13; } fsys_node_pkgs_iter_free(v16); if ( v13 ) printf(": %s\n", *(const char **)(a1 + 8)); return (unsigned int)(*(_QWORD *)(a1 + 24) != 0LL) + v13; }
static int undoablefd (fd) int fd; { int clexec; clexec = fcntl (fd, 1 , 0); if (clexec == -1 || (fd >= 10 && clexec == 1)) return 0; return 1; }
long long undoablefd(unsigned long a0) { char v0; unsigned int v1; unsigned long long v3; v1 = fcntl(a0, 0x1); if (v1 != -1 && (*(&v0) <= 9 || v1 != 1)) v3 = 1; if (v1 == -1 || v1 == 1 && *(&v0) > 9) v3 = 0; return v3; }
static int mptcp_addr_flush(int argc, char **argv) { struct { struct nlmsghdr n; struct genlmsghdr g; char buf[( ((0)+4U -1) & ~(4U -1) ) + (4096)]; } req = { .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 = (MPTCP_PM_CMD_FLUSH_ADDRS), .version = (0x1), }, }; if (rtnl_talk(&genl_rth, &req.n, ((void *)0) ) < 0) return -2; return 0; }
long mptcp_addr_flush() { long v1[514]; int v2; unsigned long v3; v3 = __readfsqword(0x28u); memset(v1, 0, sizeof(v1)); v2 = 0; LODWORD(v1[0]) = 20; WORD2(v1[0]) = genl_family; HIWORD(v1[0]) = 1; LOWORD(v1[2]) = 260; if ( (int)rtnl_talk(&genl_rth, v1, 0LL) >= 0 ) return 0LL; else return 4294967294LL; }
int verify_host_key_dns(const char *hostname, struct sockaddr *address, struct sshkey *hostkey, int *flags) { u_int counter; int result; struct rrsetinfo *fingerprints = ((void *)0) ; u_int8_t hostkey_algorithm; u_char *hostkey_digest; size_t hostkey_digest_len; u_int8_t dnskey_algorithm; u_int8_t dnskey_digest_type; u_char *dnskey_digest; size_t dnskey_digest_len; *flags = 0; sshlog("dns.c", __func__, 214, 0, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "verify_host_key_dns"); if (hostkey == ((void *)0) ) sshfatal("dns.c", __func__, 216, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "No key to look up!"); if (is_numeric_hostname(hostname)) { sshlog("dns.c", __func__, 219, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "skipped DNS lookup for numerical hostname"); return -1; } result = getrrsetbyname(hostname, 1, 44, 0, &fingerprints); if (result) { sshlog("dns.c", __func__, 226, 0, SYSLOG_LEVEL_VERBOSE, ((void *)0) , "DNS lookup error: %s", dns_result_totext(result)); return -1; } if (fingerprints->rri_flags & 1) { *flags |= 0x00000004; sshlog("dns.c", __func__, 232, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "found %d secure fingerprints in DNS", fingerprints->rri_nrdatas) ; } else { sshlog("dns.c", __func__, 235, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "found %d insecure fingerprints in DNS", fingerprints->rri_nrdatas) ; } if (fingerprints->rri_nrdatas) *flags |= 0x00000001; for (counter = 0; counter < fingerprints->rri_nrdatas; counter++) { if (!dns_read_rdata(&dnskey_algorithm, &dnskey_digest_type, &dnskey_digest, &dnskey_digest_len, fingerprints->rri_rdatas[counter].rdi_data, fingerprints->rri_rdatas[counter].rdi_length)) { sshlog("dns.c", __func__, 251, 0, SYSLOG_LEVEL_VERBOSE, ((void *)0) , "Error parsing fingerprint from DNS."); continue; } sshlog("dns.c", __func__, 254, 1, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "checking SSHFP type %d fptype %d", dnskey_algorithm, dnskey_digest_type) ; if (!dns_read_key(&hostkey_algorithm, &dnskey_digest_type, &hostkey_digest, &hostkey_digest_len, hostkey)) { sshlog("dns.c", __func__, 260, 0, SYSLOG_LEVEL_ERROR, ((void *)0) , "Error calculating key fingerprint."); freerrset(fingerprints); return -1; } if (hostkey_algorithm == dnskey_algorithm && hostkey_digest_len == dnskey_digest_len) { if (timingsafe_bcmp(hostkey_digest, dnskey_digest, hostkey_digest_len) == 0) { sshlog("dns.c", __func__, 270, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "matched SSHFP type %d fptype %d", dnskey_algorithm, dnskey_digest_type) ; *flags |= 0x00000002; } else { sshlog("dns.c", __func__, 274, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "failed SSHFP type %d fptype %d", dnskey_algorithm, dnskey_digest_type) ; *flags |= 0x00000008; } } free(dnskey_digest); free(hostkey_digest); } freerrset(fingerprints); if (*flags & 0x00000008) *flags &= ~0x00000002; if (*flags & 0x00000001) if (*flags & 0x00000002) sshlog("dns.c", __func__, 291, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "matching host key fingerprint found in DNS"); else sshlog("dns.c", __func__, 293, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "mismatching host key fingerprint found in DNS"); else sshlog("dns.c", __func__, 295, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "no host key fingerprint found in DNS"); return 0; }
long verify_host_key_dns(const char *a1, long a2, _DWORD *a3, _DWORD *a4) { const char *v5; char v8; unsigned char v9; unsigned char v10; unsigned int i; int v12; long v13; void *v14; long v15; void *ptr; size_t v17[2]; v17[1] = __readfsqword(0x28u); v13 = 0LL; *a4 = 0; sshlog("dns.c", "verify_host_key_dns", 214LL, 0LL, 7LL, 0LL, "verify_host_key_dns"); if ( !a3 ) sshfatal("dns.c", "verify_host_key_dns", 216LL, 0LL, 1LL, 0LL, "No key to look up!"); if ( (unsigned int)is_numeric_hostname(a1) ) { sshlog("dns.c", "verify_host_key_dns", 219LL, 0LL, 5LL, 0LL, "skipped DNS lookup for numerical hostname"); return 0xFFFFFFFFLL; } else { v12 = getrrsetbyname(a1, 1LL, 44LL, 0LL, &v13); if ( v12 ) { v5 = dns_result_totext(v12); sshlog("dns.c", "verify_host_key_dns", 226LL, 0LL, 4LL, 0LL, "DNS lookup error: %s", v5); return 0xFFFFFFFFLL; } else { if ( (*(_DWORD *)v13 & 1) != 0 ) { *a4 |= 4u; sshlog( "dns.c", "verify_host_key_dns", 232LL, 0LL, 5LL, 0LL, "found %d secure fingerprints in DNS", *(unsigned int *)(v13 + 16)); } else { sshlog( "dns.c", "verify_host_key_dns", 235LL, 0LL, 5LL, 0LL, "found %d insecure fingerprints in DNS", *(unsigned int *)(v13 + 16)); } if ( *(_DWORD *)(v13 + 16) ) *a4 |= 1u; for ( i = 0; i < *(_DWORD *)(v13 + 16); ++i ) { if ( (unsigned int)dns_read_rdata( &v9, &v10, &ptr, v17, *(_BYTE **)(16LL * i + *(_QWORD *)(v13 + 32) + 8), *(_DWORD *)(16LL * i + *(_QWORD *)(v13 + 32))) ) { sshlog("dns.c", "verify_host_key_dns", 254LL, 1LL, 7LL, 0LL, "checking SSHFP type %d fptype %d", v9, v10); if ( !(unsigned int)dns_read_key(&v8, &v10, &v14, &v15, a3) ) { sshlog("dns.c", "verify_host_key_dns", 260LL, 0LL, 2LL, 0LL, "Error calculating key fingerprint."); freerrset(v13); return 0xFFFFFFFFLL; } if ( v8 == v9 && v15 == v17[0] ) { if ( (unsigned int)timingsafe_bcmp(v14, ptr, v15) ) { sshlog("dns.c", "verify_host_key_dns", 274LL, 1LL, 5LL, 0LL, "failed SSHFP type %d fptype %d", v9, v10); *a4 |= 8u; } else { sshlog("dns.c", "verify_host_key_dns", 270LL, 1LL, 5LL, 0LL, "matched SSHFP type %d fptype %d", v9, v10); *a4 |= 2u; } } free(ptr); free(v14); } else { sshlog("dns.c", "verify_host_key_dns", 251LL, 0LL, 4LL, 0LL, "Error parsing fingerprint from DNS."); } } freerrset(v13); if ( (*a4 & 8) != 0 ) *a4 &= ~2u; if ( (*a4 & 1) != 0 ) { if ( (*a4 & 2) != 0 ) sshlog("dns.c", "verify_host_key_dns", 291LL, 0LL, 5LL, 0LL, "matching host key fingerprint found in DNS"); else sshlog("dns.c", "verify_host_key_dns", 293LL, 0LL, 5LL, 0LL, "mismatching host key fingerprint found in DNS"); } else { sshlog("dns.c", "verify_host_key_dns", 295LL, 0LL, 5LL, 0LL, "no host key fingerprint found in DNS"); } return 0LL; } } }
static _Bool parse_path (const struct parser_table* entry, char **argv, int *arg_ptr) { return insert_path_check (entry, argv, arg_ptr, "path", pred_path); }
long parse_path(long a1, long a2, int *a3, __m128i a4) { return insert_path_check(a1, a2, a3, (long)"path", &pred_path, a4); }
static _Bool insert_type (char **argv, int *arg_ptr, const struct parser_table *entry, PRED_FUNC which_pred) { struct predicate *our_pred; const char *typeletter; const char *pred_string = which_pred == pred_xtype ? "-xtype" : "-type"; if (! collect_arg (argv, arg_ptr, &typeletter)) return 0 ; if (!*typeletter) { ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"Arguments to %s should contain at least one letter\"), pred_string), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("Arguments to %s should contain at least one letter"), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("Arguments to %s should contain at least one letter"), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; return 0 ; } our_pred = insert_primary_withpred (entry, which_pred, typeletter); our_pred->est_success_rate = 0.0; if (which_pred == pred_xtype) { our_pred->need_stat = 1 ; our_pred->need_type = 0 ; } else { our_pred->need_stat = 0 ; our_pred->need_type = 1 ; } for (; *typeletter; ) { unsigned int type_cell; float rate = 0.01; switch (*typeletter) { case 'b': type_cell = FTYPE_BLK; rate = 0.000888f; break; case 'c': type_cell = FTYPE_CHR; rate = 0.000443f; break; case 'd': type_cell = FTYPE_DIR; rate = 0.0922f; break; case 'f': type_cell = FTYPE_REG; rate = 0.875f; break; case 'l': type_cell = FTYPE_LNK; rate = 0.0311f; break; case 'p': type_cell = FTYPE_FIFO; rate = 7.554e-6f; break; case 's': type_cell = FTYPE_SOCK; rate = 1.59e-5f; break; case 'D': type_cell = 0; ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"%s %c is not supported because Solaris doors \" \"are not supported on the platform find was compiled on.\"), pred_string, (*typeletter)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("%s %c is not supported because Solaris doors " "are not supported on the platform find was compiled on."), pred_string, (*typeletter)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("%s %c is not supported because Solaris doors " "are not supported on the platform find was compiled on."), pred_string, (*typeletter)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; break; default: type_cell = 0; ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"Unknown argument to %s: %c\"), pred_string, (*typeletter)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("Unknown argument to %s: %c"), pred_string, (*typeletter)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("Unknown argument to %s: %c"), pred_string, (*typeletter)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; return 0 ; } if (our_pred->args.types[type_cell]) { ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"Duplicate file type '%c' in the argument list to %s.\"), (*typeletter), pred_string), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("Duplicate file type '%c' in the argument list to %s."), (*typeletter), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("Duplicate file type '%c' in the argument list to %s."), (*typeletter), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; } our_pred->est_success_rate += rate; our_pred->args.types[type_cell] = 1 ; typeletter++; if (*typeletter) { if (*typeletter != ',') { ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"Must separate multiple arguments to %s using: ','\"), pred_string), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("Must separate multiple arguments to %s using: ','"), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("Must separate multiple arguments to %s using: ','"), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; return 0 ; } typeletter++; if (!*typeletter) { ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"Last file type in list argument to %s \" \"is missing, i.e., list is ending on: ','\"), pred_string), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("Last file type in list argument to %s " "is missing, i.e., list is ending on: ','"), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("Last file type in list argument to %s " "is missing, i.e., list is ending on: ','"), pred_string), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; return 0 ; } } } return 1 ; }
void insert_type(unsigned long long *a0, unsigned int *a1, unsigned long long a2, unsigned long long a3) { unsigned int v0; unsigned int v1; char *v2; unsigned long long v3; struct_1 *v4; unsigned long long v6; void* v7; unsigned long long v8; if (a3 == got.pred_xtype) v6 = "-xtype"; else v6 = "-type"; v3 = v6; *(&v6) = collect_arg(a0, a1, &v2) ^ 1; if (v6) { v7 = 0; } else if (!*(v2)) { error(0x1, 0x0, gettext("Arguments to %s should contain at least one letter")); } else { v4 = insert_primary_withpred(a2, a3, v2, a3); v4->field_24 = 0; if (a3 == got.pred_xtype) { v4->field_1a = 1; v4->field_1b = 0; } else { v4->field_1a = 0; v4->field_1b = 1; } while (*(v2)) { v1 = 4575657222417405706; switch (*(v2)) { case 68: v0 = 0; error(0x1, 0x0, gettext("%s %c is not supported because Solaris doors are not supported on the platform find was compiled on.")); case 98: v0 = 0; v1 = 4172658121722349740; break; case 99: v0 = 1; v1 = 4448662920702214772; break; case 100: v0 = 2; v1 = 4566650023189467995; break; case 102: v0 = 3; v1 = 0x3cfec56d3f600000; break; case 108: v0 = 4; v1 = 3962455593301493101; break; case 112: v0 = 5; v1 = 4000710484654127198; break; case 115: v0 = 6; v1 = 931487997; break; default: v0 = 0; error(0x1, 0x0, gettext("Unknown argument to %s: %c")); } if (v4[1].padding_0[16 + v0]) error(0x1, 0x0, gettext("Duplicate file type '%c' in the argument list to %s.")); v4->field_24 = v4->field_24 + v1; v4[1].padding_0[16 + v0] = 1; v2 += 1; if (*(v2)) { if (*(v2) != 44) error(0x1, 0x0, gettext("Must separate multiple arguments to %s using: ','")); v2 += 1; if (!*(v2)) error(0x1, 0x0, gettext("Last file type in list argument to %s is missing, i.e., list is ending on: ','")); } } v8 = 1; } return; }
char * get_force_string(void) { const struct forceinfo *fip; struct varbuf vb = { 0, 0, ((void *)0) }; for (fip = forceinfos; fip->name; fip++) { if ((enum force_flags)fip->flag == FORCE_ALL || (fip->flag & force_mask) != fip->flag || !in_force(fip->flag)) continue; if (vb.used) varbuf_add_char(&vb, ','); varbuf_add_buf(&vb, fip->name, strlen(fip->name)); } varbuf_end_str(&vb); return varbuf_detach(&vb); }
long get_force_string() { size_t v0; char **i; long v3[4]; v3[3] = __readfsqword(0x28u); memset(v3, 0, 24); for ( i = &forceinfos; *i; i += 3 ) { if ( *((_DWORD *)i + 2) != -1 && (force_mask & (_DWORD)i[1]) == *((_DWORD *)i + 2) && in_force(*((_DWORD *)i + 2)) ) { if ( v3[0] ) varbuf_add_char(v3, 44LL); v0 = strlen(*i); varbuf_add_buf(v3, *i, v0); } } varbuf_end_str(v3); return varbuf_detach(v3); }
off_t gztell(file) gzFile file; { off64_t ret; ret = gztell64(file); return ret == (off_t)ret ? (off_t)ret : -1; }
undefined8 gztell(undefined8 param_1) { undefined8 uVar1; uVar1 = gztell64(param_1); return uVar1; }
static _Bool posixtest (int nargs) { _Bool value; switch (nargs) { case 1: value = one_argument (); break; case 2: value = two_arguments (); break; case 3: value = three_arguments (); break; case 4: if ((strcmp (argv[pos], "!") == 0)) { advance ( 1 ); value = !three_arguments (); break; } if ((strcmp (argv[pos], "(") == 0) && (strcmp (argv[pos + 3], ")") == 0)) { advance ( 0 ); value = two_arguments (); advance ( 0 ); break; } __attribute__ ((__fallthrough__)); case 5: default: if (nargs <= 0) abort (); value = expr (); } return (value); }
int posixtest(unsigned long a0) { char v0; unsigned long long v2; unsigned long long v3; unsigned long long v4; unsigned long long v5; if (a0 == 4) { v2 = strcmp(*((argv + pos * 8)), "!"); if (!v2) { advance(0x1); v4 = three_arguments(); *(&v4) = v4; *(&v4) = v4 ^ 1; v0 = v4; v0 &= 1; } else { v3 = strcmp(*((argv + pos * 8)), "("); if (!v3) { v5 = strcmp(*((argv + (pos + 3) * 8)), ")"); if (!v5) { advance(0x0); v0 = two_arguments(); advance(0x0); } } } } else if (a0 <= 4) { if (a0 == 3) { v0 = three_arguments(); } else if (a0 <= 3) { if (a0 == 1) v0 = one_argument(); if (a0 == 2) v0 = two_arguments(); } } if (a0 > 4 && a0 != 4 || a0 == 4 && v2 && v3 || a0 == 4 && !v3 && v5 && v2 || a0 <= 4 && a0 != 3 && a0 != 4 && a0 > 3 || a0 <= 4 && a0 <= 3 && a0 != 3 && a0 != 1 && a0 != 2 && a0 != 4) { if (a0 <= 0) abort(); v0 = expr(); } if (!v2 && a0 == 4 || a0 == 3 && a0 <= 4 && a0 != 4 || !v5 && a0 == 4 && !v3 && v2 || a0 <= 4 && a0 == 1 && a0 <= 3 && a0 != 3 && a0 != 4 || a0 <= 4 && a0 == 2 && a0 <= 3 && a0 != 3 && a0 != 1 && a0 != 4 || a0 > 0 && (a0 > 4 && a0 != 4 || a0 == 4 && v2 && v3 || a0 == 4 && !v3 && v5 && v2 || a0 <= 4 && a0 != 3 && a0 != 4 && a0 > 3 || a0 <= 4 && a0 <= 3 && a0 != 3 && a0 != 1 && a0 != 2 && a0 != 4)) return v0; }
static void * internal_realloc (mem, n, file, line, flags) void * mem; register size_t n; const char *file; int line, flags; { register union mhead *p; register unsigned int tocopy; register unsigned int nbytes; register int newunits, nunits; register char *m, *z; mguard_t mg; if (n == 0) { internal_free (mem, file, line, 0x02); return ( ((void *)0) ); } if ((p = (union mhead *) mem) == 0) return internal_malloc (n, file, line, 0x02); p--; nunits = p->minfo.mi_index; do { if (!(nunits < 28)) xbotch((void *)0, 0x08, "nunits < 28", file, line); } while (0); if (p->minfo.mi_alloc != ((char) 0xf7)) xbotch (mem, 0x02, gettext("realloc: called with unallocated block argument"), file, line); do { if (!(p->minfo.mi_magic2 == 0x5555)) xbotch((void *)0, 0x08, "p->minfo.mi_magic2 == 0x5555", file, line); } while (0); nbytes = (((p->minfo.mi_nbytes) + sizeof(union mhead) + 4 + 15) & ~15); if (((nbytes) <= binsizes[(nunits)]) == 0) xbotch (mem, 0x04, gettext("realloc: underflow detected; mh_nbytes out of range"), file, line); { int i; for (i = 0, z = p->minfo.mi_magic8; i < 8; i++) if (*z++ != 0x55) xbotch (mem, 0x04, gettext("realloc: underflow detected; magic8 corrupted"), file, line); } m = (char *)mem + (tocopy = p->minfo.mi_nbytes); z = mg.s; *z++ = *m++, *z++ = *m++, *z++ = *m++, *z++ = *m++; if (mg.i != p->minfo.mi_nbytes) xbotch (mem, 0x08, gettext("realloc: start and end chunk sizes differ"), file, line); if (n == p->minfo.mi_nbytes) return mem; if ((((n) + sizeof(union mhead) + 4 + 15) & ~15) > binsizes[28 -1]) return ((void *) ((void *)0) ); nbytes = (((n) + sizeof(union mhead) + 4 + 15) & ~15); if ((((nbytes) > binsizes[(nunits)-1]) && ((nbytes) <= binsizes[(nunits)])) || (((nbytes) > binsizes[(nunits-1)-1]) && ((nbytes) <= binsizes[(nunits-1)]))) { m -= 4; *m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0; m = (char *)mem + (p->minfo.mi_nbytes = n); mg.i = n; z = mg.s; *m++ = *z++, *m++ = *z++, *m++ = *z++, *m++ = *z++; return mem; } if (n < tocopy) tocopy = n; if (nbytes > p->minfo.mi_nbytes) newunits = nunits; else newunits = (nbytes <= (pagesz >> 1)) ? 0 : pagebucket; for ( ; newunits < 28; newunits++) if (nbytes <= binsizes[(newunits)]) break; if (nunits > malloc_mmap_threshold && newunits > malloc_mmap_threshold) { m = internal_remap (mem, n, newunits, 0x02); if (m == 0) return 0; } else { if ((m = internal_malloc (n, file, line, 0x02|0x04|0x08)) == 0) return 0; __builtin_memcpy (m, mem, tocopy); internal_free (mem, file, line, 0x02); } return m; }
char * internal_realloc(char *a1, size_t a2, char *a3, unsigned int a4) { char *v5; int v6; char *v7; char *v8; char *v9; char *v10; char *v11; unsigned int v12; char *v13; char *v14; char *v15; unsigned int v16; char *v17; char *v18; int v19; int v20; void *v21; int v24; int v25; if ( !a2 ) { internal_free(a1, a3, a4); return 0LL; } if ( !a1 ) return (char *)internal_malloc(a2, a3, a4); v5 = a1 - 16; v6 = *(a1 - 15); if ( v6 > 27 ) xbotch(0LL, 8LL, (long)"nunits < 28", a3, a4); if ( *v5 != -9 ) { v7 = gettext("realloc: called with unallocated block argument"); xbotch((long)a1, 2LL, (long)v7, a3, a4); } if ( *((_WORD *)v5 + 1) != 21845 ) xbotch(0LL, 8LL, (long)"p->minfo.mi_magic2 == 0x5555", a3, a4); if ( (unsigned long)((*((_DWORD *)v5 + 1) + 35) & 0xFFFFFFF0) > binsizes[v6] ) { v8 = gettext("realloc: underflow detected; mh_nbytes out of range"); xbotch((long)a1, 4LL, (long)v8, a3, a4); } v24 = 0; v9 = v5 + 8; while ( v24 <= 7 ) { v10 = v9++; if ( *v10 != 85 ) { v11 = gettext("realloc: underflow detected; magic8 corrupted"); xbotch((long)a1, 4LL, (long)v11, a3, a4); } ++v24; } v12 = *((_DWORD *)v5 + 1); v13 = &a1[v12]; LOBYTE(v25) = *v13++; BYTE1(v25) = *v13++; BYTE2(v25) = *v13++; v14 = v13 + 1; HIBYTE(v25) = *v13; if ( v25 != v12 ) { v15 = gettext("realloc: start and end chunk sizes differ"); xbotch((long)a1, 8LL, (long)v15, a3, a4); } if ( a2 == *((_DWORD *)v5 + 1) ) return a1; if ( ((a2 + 35) & 0xFFFFFFFFFFFFFFF0LL) > 0xFFFFFFFF ) return 0LL; v16 = (a2 + 35) & 0xFFFFFFF0; if ( (unsigned long)v16 > binsizes[v6 - 1] && (unsigned long)v16 <= binsizes[v6] || (unsigned long)v16 > binsizes[v6 - 2] && (unsigned long)v16 <= binsizes[v6 - 1] ) { v17 = v14 - 4; *v17 = 0; v17[1] = 0; v17[2] = 0; v17[3] = 0; *((_DWORD *)v5 + 1) = a2; v18 = &a1[*((unsigned int *)v5 + 1)]; *v18 = a2; *(_WORD *)(v18 + 1) = (unsigned int)a2 >> 8; v18[3] = BYTE3(a2); return a1; } if ( a2 < v12 ) v12 = a2; if ( v16 <= *((_DWORD *)v5 + 1) ) { if ( v16 <= pagesz >> 1 ) v20 = 0; else v20 = pagebucket; v19 = v20; } else { v19 = v6; } while ( v19 <= 27 && (unsigned long)v16 > binsizes[v19] ) ++v19; if ( v6 <= malloc_mmap_threshold || v19 <= malloc_mmap_threshold ) { v21 = (void *)internal_malloc(a2, a3, a4); if ( !v21 ) return 0LL; memcpy(v21, a1, v12); internal_free(a1, a3, a4); } else { v21 = internal_remap((long)a1, a2, v19); if ( !v21 ) return 0LL; } return (char *)v21; }
static int putx(c) int c; { int x; x = putc (c, rl_outstream); return x; }
long long putx(unsigned long a0) { unsigned int v0; v0 = putc(a0, rl_outstream); return v0; }
static void killchild(int signo) { pid_t pid; pid = sshpid; if (pid > 1) { kill(pid, 15 ); waitpid(pid, ((void *)0) , 0); } _exit(1); }
void killchild(void) { int __pid; __pid = sshpid; if (1 < sshpid) { kill(sshpid,0xf); waitpid(__pid,(int *)0x0,0); } _exit(1); }
int sshbuf_put_u16(struct sshbuf *buf, u_int16_t val) { u_char *p; int r; if ((r = sshbuf_reserve(buf, 2, &p)) < 0) return r; do { const u_int16_t __v = (val); ((u_char *)(p))[0] = (__v >> 8) & 0xff; ((u_char *)(p))[1] = __v & 0xff; } while (0); return 0; }
int sshbuf_put_u16(undefined8 param_1,undefined2 param_2) { int iVar1; long in_FS_OFFSET; undefined *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = sshbuf_reserve(param_1,2,&local_18); if (-1 < iVar1) { *local_18 = (char)((ushort)param_2 >> 8); local_18[1] = (char)param_2; iVar1 = 0; } if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) { return iVar1; } __stack_chk_fail(); }
const char * kex_default_pk_alg(void) { static char *pkalgs; if (pkalgs == ((void *)0) ) { char *all_key; all_key = sshkey_alg_list(0, 0, 1, ','); pkalgs = match_filter_allowlist("ssh-ed25519-cert-v01@openssh.com," "ecdsa-sha2-nistp256-cert-v01@openssh.com," "ecdsa-sha2-nistp384-cert-v01@openssh.com," "ecdsa-sha2-nistp521-cert-v01@openssh.com," "sk-ssh-ed25519-cert-v01@openssh.com," "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com," "rsa-sha2-512-cert-v01@openssh.com," "rsa-sha2-256-cert-v01@openssh.com," "ssh-ed25519," "ecdsa-sha2-nistp256," "ecdsa-sha2-nistp384," "ecdsa-sha2-nistp521," "sk-ssh-ed25519@openssh.com," "sk-ecdsa-sha2-nistp256@openssh.com," "rsa-sha2-512," "rsa-sha2-256", all_key); free(all_key); } return pkalgs; }
long kex_default_pk_alg() { void *ptr; if ( !pkalgs_19152 ) { ptr = (void *)sshkey_alg_list(0LL, 0LL, 1LL, 44LL); pkalgs_19152 = match_filter_allowlist( "ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-" "v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecd" "sa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@opens" "sh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@opens" "sh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256", ptr); free(ptr); } return pkalgs_19152; }
int rl_char_search (int count, int key) { if ((rl_readline_state & (0x0080000))) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_data->i1 = 2; _rl_callback_data->i2 = -2; _rl_callback_func = _rl_char_search_callback; return (0); } return (_rl_char_search (count, 2, -2)); }
long long rl_char_search(unsigned long a0, unsigned long a1) { unsigned int v0; void* v2; v0 = a1; if (!(rl_readline_state & 0x80000)) { v2 = _rl_char_search(a0, 0x2, 0xfffffffe); } else { _rl_callback_data = _rl_callback_data_alloc(a0); *((_rl_callback_data + 4)) = 2; *((_rl_callback_data + 8)) = -2; _rl_callback_func = _rl_char_search_callback; v2 = 0; } return v2; }
static void add_cert_option(char *opt) { char *val, *cp; int iscrit = 0; if (strcasecmp(opt, "clear") == 0) certflags_flags = 0; else if (strcasecmp(opt, "no-x11-forwarding") == 0) certflags_flags &= ~(1); else if (strcasecmp(opt, "permit-x11-forwarding") == 0) certflags_flags |= (1); else if (strcasecmp(opt, "no-agent-forwarding") == 0) certflags_flags &= ~(1<<1); else if (strcasecmp(opt, "permit-agent-forwarding") == 0) certflags_flags |= (1<<1); else if (strcasecmp(opt, "no-port-forwarding") == 0) certflags_flags &= ~(1<<2); else if (strcasecmp(opt, "permit-port-forwarding") == 0) certflags_flags |= (1<<2); else if (strcasecmp(opt, "no-pty") == 0) certflags_flags &= ~(1<<3); else if (strcasecmp(opt, "permit-pty") == 0) certflags_flags |= (1<<3); else if (strcasecmp(opt, "no-user-rc") == 0) certflags_flags &= ~(1<<4); else if (strcasecmp(opt, "permit-user-rc") == 0) certflags_flags |= (1<<4); else if (strcasecmp(opt, "touch-required") == 0) certflags_flags &= ~(1<<5); else if (strcasecmp(opt, "no-touch-required") == 0) certflags_flags |= (1<<5); else if (strcasecmp(opt, "no-verify-required") == 0) certflags_flags &= ~(1<<6); else if (strcasecmp(opt, "verify-required") == 0) certflags_flags |= (1<<6); else if (strncasecmp(opt, "force-command=", 14) == 0) { val = opt + 14; if (*val == '\0') sshfatal("ssh-keygen.c", __func__, 2027, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Empty force-command option"); if (certflags_command != ((void *)0) ) sshfatal("ssh-keygen.c", __func__, 2029, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "force-command already specified"); certflags_command = xstrdup(val); } else if (strncasecmp(opt, "source-address=", 15) == 0) { val = opt + 15; if (*val == '\0') sshfatal("ssh-keygen.c", __func__, 2034, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Empty source-address option"); if (certflags_src_addr != ((void *)0) ) sshfatal("ssh-keygen.c", __func__, 2036, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "source-address already specified"); if (addr_match_cidr_list( ((void *)0) , val) != 0) sshfatal("ssh-keygen.c", __func__, 2038, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Invalid source-address list"); certflags_src_addr = xstrdup(val); } else if (strncasecmp(opt, "extension:", 10) == 0 || (iscrit = (strncasecmp(opt, "critical:", 9) == 0))) { val = xstrdup(strchr(opt, ':') + 1); if ((cp = strchr(val, '=')) != ((void *)0) ) *cp++ = '\0'; cert_ext_add(val, cp, iscrit); free(val); } else sshfatal("ssh-keygen.c", __func__, 2048, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Unsupported certificate option \"%s\"", opt); }
void add_cert_option(long a1) { int v1; char *v2; char *v3; int v4; char *v5; char *s; char *sa; v4 = 0; if ( !strcasecmp((const char *)a1, "clear") ) { certflags_flags = 0; } else if ( !strcasecmp((const char *)a1, "no-x11-forwarding") ) { certflags_flags &= ~1u; } else if ( !strcasecmp((const char *)a1, "permit-x11-forwarding") ) { certflags_flags |= 1u; } else if ( !strcasecmp((const char *)a1, "no-agent-forwarding") ) { certflags_flags &= ~2u; } else if ( !strcasecmp((const char *)a1, "permit-agent-forwarding") ) { certflags_flags |= 2u; } else if ( !strcasecmp((const char *)a1, "no-port-forwarding") ) { certflags_flags &= ~4u; } else if ( !strcasecmp((const char *)a1, "permit-port-forwarding") ) { certflags_flags |= 4u; } else if ( !strcasecmp((const char *)a1, "no-pty") ) { certflags_flags &= ~8u; } else if ( !strcasecmp((const char *)a1, "permit-pty") ) { certflags_flags |= 8u; } else if ( !strcasecmp((const char *)a1, "no-user-rc") ) { certflags_flags &= ~0x10u; } else if ( !strcasecmp((const char *)a1, "permit-user-rc") ) { certflags_flags |= 0x10u; } else if ( !strcasecmp((const char *)a1, "touch-required") ) { certflags_flags &= ~0x20u; } else if ( !strcasecmp((const char *)a1, "no-touch-required") ) { certflags_flags |= 0x20u; } else if ( !strcasecmp((const char *)a1, "no-verify-required") ) { certflags_flags &= ~0x40u; } else if ( !strcasecmp((const char *)a1, "verify-required") ) { certflags_flags |= 0x40u; } else if ( !strncasecmp((const char *)a1, "force-command=", 0xEuLL) ) { if ( !*(_BYTE *)(a1 + 14) ) sshfatal("ssh-keygen.c", "add_cert_option", 2027LL, 0LL, 1LL, 0LL, "Empty force-command option"); if ( certflags_command ) sshfatal("ssh-keygen.c", "add_cert_option", 2029LL, 0LL, 1LL, 0LL, "force-command already specified"); certflags_command = xstrdup(a1 + 14); } else if ( !strncasecmp((const char *)a1, "source-address=", 0xFuLL) ) { s = (char *)(a1 + 15); if ( !*(_BYTE *)(a1 + 15) ) sshfatal("ssh-keygen.c", "add_cert_option", 2034LL, 0LL, 1LL, 0LL, "Empty source-address option"); if ( certflags_src_addr ) sshfatal("ssh-keygen.c", "add_cert_option", 2036LL, 0LL, 1LL, 0LL, "source-address already specified"); if ( (unsigned int)addr_match_cidr_list(0LL, s) ) sshfatal("ssh-keygen.c", "add_cert_option", 2038LL, 0LL, 1LL, 0LL, "Invalid source-address list"); certflags_src_addr = xstrdup(s); } else if ( strncasecmp((const char *)a1, "extension:", 0xAuLL) && (v1 = strncasecmp((const char *)a1, "critical:", 9uLL), v4 = v1 == 0, v1) ) { sshfatal( "ssh-keygen.c", "add_cert_option", 2048LL, 0LL, 1LL, 0LL, "Unsupported certificate option \"%s\"", (const char *)a1); } else { v2 = strchr((const char *)a1, 58); sa = (char *)xstrdup(v2 + 1); v5 = strchr(sa, 61); if ( v5 ) { v3 = v5++; *v3 = 0; } cert_ext_add((long)sa, (long)v5, v4); free(sa); } }
static int screen_columns (void) { struct winsize win; if (get_win_size ( 1 , &win) == 0 && 0 < win.ws_col) return win.ws_col; { char *col_string = getenv ("COLUMNS"); long int n_columns; if (!(col_string != ((void *)0) && xstrtol (col_string, ((void *)0) , 0, &n_columns, "") == LONGINT_OK && 0 < n_columns && n_columns <= 0x7fffffff)) n_columns = 80; return n_columns; } }
int screen_columns() { unsigned long long v0; unsigned long long v1; char v2; char v3; unsigned int v5; if (!get_win_size(0x1, &v2) && *(&v3)) { v5 = *(&v3); goto LABEL_4029a7; } v1 = getenv("COLUMNS"); if (v1 && !xstrtol(v1, 0x0, 0x0, &v0, &g_403df3) && v0 > 0 && v0 < 0x80000000) goto LABEL_4029a3; v0 = 80; LABEL_4029a3: v5 = v0; LABEL_4029a7: return v5; }
static void delete_local_contexts (vcxt) VAR_CONTEXT *vcxt; { VAR_CONTEXT *v, *t; for (v = vcxt; v != global_variables; v = t) { t = v->down; dispose_var_context (v); } }
void delete_local_contexts(void* a0) { struct_0 *v0; void* v1; unsigned long long v3; v0 = a0; while (true) { v3 = global_variables; if (v0 == global_variables) break; v1 = v0->field_18; dispose_var_context(v0); v0 = v1; } return; }
static void popexp () { EXPR_CONTEXT *context; if (expr_depth <= 0) { expression = lasttp = 0; evalerror (gettext("recursion stack underflow")); } context = expr_stack[--expr_depth]; expression = context->expression; do { curtok = (context)->curtok; lasttok = (context)->lasttok; tp = (context)->tp; lasttp = (context)->lasttp; tokval = (context)->tokval; tokstr = (context)->tokstr; noeval = (context)->noeval; curlval = (context)->lval; } while (0); sh_xfree((context), "expr.c", 299); }
void popexp(void) { undefined4 *puVar1; undefined8 uVar2; if (expr_depth < 1) { lasttp = 0; expression = 0; uVar2 = gettext("recursion stack underflow"); evalerror(uVar2); } expr_depth = expr_depth + -1; puVar1 = *(undefined4 **)(expr_stack + (long)expr_depth * 8); expression = *(undefined8 *)(puVar1 + 2); curtok = *puVar1; lasttok = puVar1[1]; tp = *(undefined8 *)(puVar1 + 4); lasttp = *(undefined8 *)(puVar1 + 6); tokval = *(undefined8 *)(puVar1 + 8); tokstr = *(undefined8 *)(puVar1 + 10); noeval = puVar1[0xc]; curlval._0_8_ = *(undefined8 *)(puVar1 + 0xe); curlval._8_8_ = *(undefined8 *)(puVar1 + 0x10); curlval._16_8_ = *(undefined8 *)(puVar1 + 0x12); curlval._24_8_ = *(undefined8 *)(puVar1 + 0x14); sh_xfree(puVar1,"expr.c",299); return; }
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 long nvis(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4) { unsigned long v0; char v1; unsigned int v2; char v3; char v4; void* v6; v0 = a1; v3 = a2; v4 = a4; v2 = istrsenvisx(&v1, &v0, &v3, 0x1, a3, &g_4018e8, 0x0); if (v2 < 0) v6 = 0; else v6 = v2 + a0; return v6; }
) { fprintf( stderr , "Memory error\n"); exit(1); }
int fprintf(FILE *__stream,char *__format,...) { halt_baddata(); }
char * _getenv (name) const char *name; { return (getenv (name)); }
long long _getenv(char *a0) { return getenv(a0); }
0 ) do { fprintf ( stderr , gettext ("Try '%s --help' for more information.\n"), program_name); } while (0);
int fprintf(FILE *__stream,char *__format,...) { halt_baddata(); }
int decode_attrib(struct sshbuf *b, Attrib *a) { int r; attrib_clear(a); if ((r = sshbuf_get_u32(b, &a->flags)) != 0) return r; if (a->flags & 0x00000001) { if ((r = sshbuf_get_u64(b, &a->size)) != 0) return r; } if (a->flags & 0x00000002) { if ((r = sshbuf_get_u32(b, &a->uid)) != 0 || (r = sshbuf_get_u32(b, &a->gid)) != 0) return r; } if (a->flags & 0x00000004) { if ((r = sshbuf_get_u32(b, &a->perm)) != 0) return r; } if (a->flags & 0x00000008) { if ((r = sshbuf_get_u32(b, &a->atime)) != 0 || (r = sshbuf_get_u32(b, &a->mtime)) != 0) return r; } if (a->flags & 0x80000000) { char *type; u_char *data; size_t dlen; u_int i, count; if ((r = sshbuf_get_u32(b, &count)) != 0) return r; for (i = 0; i < count; i++) { if ((r = sshbuf_get_cstring(b, &type, ((void *)0) )) != 0 || (r = sshbuf_get_string(b, &data, &dlen)) != 0) return r; sshlog("sftp-common.c", __func__, 144, 0, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "Got file attribute \"%.100s\" len %zu", type, dlen) ; free(type); free(data); } } return 0; }
long decode_attrib(long a1, int *a2) { unsigned int v3; unsigned int u32; unsigned int i; void *ptr; void *v7; size_t v8[2]; v8[1] = __readfsqword(0x28u); attrib_clear((long)a2); u32 = sshbuf_get_u32(a1, a2); if ( u32 ) return u32; if ( (*a2 & 1) != 0 ) { u32 = sshbuf_get_u64(a1, a2 + 2); if ( u32 ) return u32; } if ( (*a2 & 2) != 0 ) { u32 = sshbuf_get_u32(a1, a2 + 4); if ( u32 ) return u32; u32 = sshbuf_get_u32(a1, a2 + 5); if ( u32 ) return u32; } if ( (*a2 & 4) != 0 ) { u32 = sshbuf_get_u32(a1, a2 + 6); if ( u32 ) return u32; } if ( (*a2 & 8) != 0 ) { u32 = sshbuf_get_u32(a1, a2 + 7); if ( u32 ) return u32; u32 = sshbuf_get_u32(a1, a2 + 8); if ( u32 ) return u32; } if ( *a2 < 0 ) { u32 = sshbuf_get_u32(a1, &v3); if ( u32 ) return u32; for ( i = 0; i < v3; ++i ) { u32 = sshbuf_get_cstring(a1, &ptr, 0LL); if ( u32 ) return u32; u32 = sshbuf_get_string(a1, &v7, v8); if ( u32 ) return u32; sshlog( "sftp-common.c", "decode_attrib", 144LL, 0LL, 7LL, 0LL, "Got file attribute \"%.100s\" len %zu", (const char *)ptr, v8[0]); free(ptr); free(v7); } } return 0LL; }
int kexgex_server(struct ssh *ssh) { ssh_dispatch_set(ssh, 34, &input_kex_dh_gex_request); sshlog("kexgexs.c", __func__, 67, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "expecting SSH2_MSG_KEX_DH_GEX_REQUEST"); return 0; }
long long kexgex_server(unsigned long long a0) { unsigned long long v0; ssh_dispatch_set(a0, 0x22, input_kex_dh_gex_request); v0 = "expecting SSH2_MSG_KEX_DH_GEX_REQUEST"; sshlog("kexgexs.c", "kexgex_server", 0x43, 0x0, 0x5, 0x0); return 0; }
static inline char *_STPUTC(int c, char *p) { if (p == sstrend) p = growstackstr(); *p++ = c; return p; }
int _STPUTC(unsigned long a0, unsigned long a1) { char *v0; int tmp_13; v0 = a1; if (v0 == sstrend) v0 = growstackstr(); tmp_13 = v0; v0 += 1; *(tmp_13) = a0; return v0; }
int acl_valid(acl_t acl) { int result; result = acl_check(acl, ((void *)0) ); if (result != 0) { if (result > 0) (*__errno_location ()) = 22 ; return -1; } return 0; }
long long acl_valid(unsigned long long a0) { unsigned int v0; unsigned long long v2; v0 = acl_check(a0, 0x0); if (!v0) { v2 = 0; return v2; } else if (v0 <= 0) { v2 = 4294967295; return v2; } else { *(__errno_location()) = 22; v2 = 4294967295; return v2; } }
static void add_to_index(int level, char *item) { char *c = ((void *)0) ; label[3]++; if (label[3] > 'Z') { label[3] = 'A'; label[2]++; } if (level != subs) { if (subs) { strmaxcpy(manidx + mip, "</DL>\n", 10000 - mip); mip += 6; } else { strmaxcpy(manidx + mip, "<DL>\n", 10000 - mip); mip += 5; } } subs = level; scan_troff(item, 1, &c); sprintf(manidx + mip, "<DT><A HREF=\"#%s\">%s</A><DD>\n", label, c); if (c) free(c); while (manidx[mip]) mip++; }
void add_to_index(unsigned long a0, unsigned long long a1) { void* v0; char v1; unsigned long long *v3; unsigned long long v4; v0 = 0; g_40a8e7 = g_40a8e7 + 1; if (g_40a8e7 > 90) { g_40a8e7 = 65; g_40a8e6 = g_40a8e6 + 1; } if (a0 != subs) { if (subs) { strmaxcpy(&(&manidx)[mip], "</DL>\n", 10000 - mip); mip = mip + 6; } else { strmaxcpy(&(&manidx)[mip], "<DL>\n", 10000 - mip); mip = mip + 5; } } subs = a0; scan_troff(a1, 0x1, &v0); sprintf(&(&manidx)[mip], "<DT><A HREF=\"#%s\">%s</A><DD>\n", &label, v0); if (v0) free(v0); for (; *(&(&manidx)[mip]); mip = mip + 1); v4 = *(&v1) ^ v3[5]; return; }
static int iptoken_set(int argc, char **argv, _Bool delete) { struct { struct nlmsghdr n; struct ifinfomsg ifi; char buf[512]; } req = { .n.nlmsg_len = ((sizeof(struct ifinfomsg)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))), .n.nlmsg_flags = 0x01, .n.nlmsg_type = RTM_SETLINK, .ifi.ifi_family = 10 , }; struct rtattr *afs, *afs6; _Bool have_token = delete, have_dev = 0 ; inet_prefix addr = { .bytelen = 16, }; while (argc > 0) { if (strcmp(*argv, "dev") == 0) { do { argv++; if (--argc <= 0) incomplete_command(); } while(0); if (!have_dev) { if ((req.ifi.ifi_index = ll_name_to_index(*argv)) == 0) invarg("dev is invalid\n", *argv); have_dev = 1 ; } } else { if (matches(*argv, "help") == 0) usage(); if (!have_token) { get_prefix(&addr, *argv, req.ifi.ifi_family); have_token = 1 ; } } argc--; argv++; } if (!have_token) { fprintf( stderr , "Not enough information: token is required.\n"); return -1; } if (!have_dev) { fprintf( stderr , "Not enough information: \"dev\" argument is required.\n"); return -1; } afs = addattr_nest(&req.n, sizeof(req), IFLA_AF_SPEC); afs6 = addattr_nest(&req.n, sizeof(req), 10 ); addattr_l(&req.n, sizeof(req), IFLA_INET6_TOKEN, &addr.data, addr.bytelen); addattr_nest_end(&req.n, afs6); addattr_nest_end(&req.n, afs); if (rtnl_talk(&rth, &req.n, ((void *)0) ) < 0) return -2; return 0; }
long iptoken_set(int a1, const char **a2, char a3) { char v7; long v8; long v9; short v10[136]; int v11[138]; unsigned long v12; v12 = __readfsqword(0x28u); memset(v11, 0, 0x220uLL); v11[0] = 32; v11[1] = 65555; LOBYTE(v11[4]) = 10; v7 = 0; memset(v10, 0, 0x108uLL); v10[1] = 16; while ( a1 > 0 ) { if ( !strcmp(*a2, "dev") ) { ++a2; if ( --a1 <= 0 ) incomplete_command(); if ( v7 != 1 ) { v11[5] = ll_name_to_index(*a2); if ( !v11[5] ) invarg("dev is invalid\n", *a2); v7 = 1; } } else { if ( (unsigned char)matches(*a2, "help") != 1 ) usage(); if ( a3 != 1 ) { get_prefix(v10, *a2, LOBYTE(v11[4])); a3 = 1; } } --a1; ++a2; } if ( a3 != 1 ) { fprintf(stderr, "Not enough information: token is required.\n"); return 0xFFFFFFFFLL; } else if ( v7 != 1 ) { fprintf(stderr, "Not enough information: \"dev\" argument is required.\n"); return 0xFFFFFFFFLL; } else { v8 = addattr_nest(v11, 544LL, 26LL); v9 = addattr_nest(v11, 544LL, 10LL); addattr_l(v11, 544LL, 7LL, &v10[4], (unsigned short)v10[1]); addattr_nest_end(v11, v9); addattr_nest_end(v11, v8); if ( (int)rtnl_talk(&rth, v11, 0LL) >= 0 ) return 0LL; else return 4294967294LL; } }
static int print_mptcp_addrinfo(struct rtattr *addrinfo) { struct rtattr *tb[(__MPTCP_PM_ADDR_ATTR_MAX - 1) + 1]; __u8 family = 0 , addr_attr_type; const char *ifname; unsigned int flags; __u16 id, port; int index; (parse_rtattr_flags((tb), ((__MPTCP_PM_ADDR_ATTR_MAX - 1)), ((void*)(((char*)(addrinfo)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((addrinfo)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), (1 << 15))); open_json_object( ((void *)0) ); if (tb[MPTCP_PM_ADDR_ATTR_FAMILY]) family = rta_getattr_u8(tb[MPTCP_PM_ADDR_ATTR_FAMILY]); addr_attr_type = family == 2 ? MPTCP_PM_ADDR_ATTR_ADDR4 : MPTCP_PM_ADDR_ATTR_ADDR6; if (tb[addr_attr_type]) { print_string(PRINT_ANY, "address", "%s ", format_host(family, ((int)((tb[addr_attr_type])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), ((void*)(((char*)(tb[addr_attr_type])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))))); } if (tb[MPTCP_PM_ADDR_ATTR_PORT]) { port = rta_getattr_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]); if (port) print_uint(PRINT_ANY, "port", "port %u ", port); } if (tb[MPTCP_PM_ADDR_ATTR_ID]) { id = rta_getattr_u8(tb[MPTCP_PM_ADDR_ATTR_ID]); print_uint(PRINT_ANY, "id", "id %u ", id); } if (tb[MPTCP_PM_ADDR_ATTR_FLAGS]) { flags = rta_getattr_u32(tb[MPTCP_PM_ADDR_ATTR_FLAGS]); print_mptcp_addr_flags(flags); } if (tb[MPTCP_PM_ADDR_ATTR_IF_IDX]) { index = rta_getattr_s32(tb[MPTCP_PM_ADDR_ATTR_IF_IDX]); ifname = index ? ll_index_to_name(index) : ((void *)0) ; if (ifname) print_string(PRINT_ANY, "dev", "dev %s ", ifname); } close_json_object(); print_string(PRINT_FP, ((void *)0) , "\n", ((void *)0) ); fflush( stdout ); return 0; }
void print_mptcp_addrinfo(unsigned short *a0) { char v0; char v1; unsigned short v2; unsigned short v3; unsigned int v4; unsigned int v5; void* v6; char v7; char v8; char v9; char v10; char v11; char v12; void* v15; void* v16; v0 = 0; parse_rtattr_flags(&v7, 0x7, a0 + 2, *(a0) - 4, 0x8000); open_json_object(0x0); if (*(&v8)) v0 = rta_getattr_u8(*(&v8)); *(&v1) = (v0 == 2 ? 4 : 3); if (*(&(&v7)[8 * v1])) print_string(0x4, "address", "%s ", format_host(v0, *(*(&(&v7)[8 * v1])) - 4, *(&(&v7)[8 * v1]) + 4, *(*(&(&v7)[8 * v1])) - 4)); if (*(&v10)) { v2 = rta_getattr_u16(*(&v10)); if (v2) print_uint(0x4, "port", "port %u ", v2); } if (*(&v9)) { v3 = rta_getattr_u8(*(&v9)); print_uint(0x4, "id", "id %u ", v3); } if (*(&v11)) { v4 = rta_getattr_u32(*(&v11)); print_mptcp_addr_flags(v4); } if (*(&v12)) { v5 = rta_getattr_s32(*(&v12)); if (!v5) v15 = 0; else v15 = ll_index_to_name(v5); v6 = v15; if (v6) print_string(0x4, "dev", "dev %s ", v6); } close_json_object(); print_string(0x1, 0x0, "\n", 0x0); fflush(stdout); v16 = 0; return; }
int platform_privileged_uidswap(void) { return (getuid() == 0 || geteuid() == 0); }
undefined8 platform_privileged_uidswap(void) { __uid_t _Var1; _Var1 = getuid(); if ((_Var1 != 0) && (_Var1 = geteuid(), _Var1 != 0)) { return 0; } return 1; }
static _Bool parse_old_offset (char const *s, uintmax_t *offset) { int radix; if (*s == '\0') return 0 ; if (s[0] == '+') ++s; if (strchr (s, '.') != ((void *)0) ) radix = 10; else { if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) radix = 16; else radix = 8; } return xstrtoumax (s, ((void *)0) , radix, offset, "Bb") == LONGINT_OK; }
bool parse_old_offset(char *a1, long a2) { char *s; unsigned int v4; s = a1; if ( !*a1 ) return 0; if ( *a1 == 43 ) s = a1 + 1; if ( strchr(s, 46) ) { v4 = 10; } else if ( *s == 48 && (s[1] == 120 || s[1] == 88) ) { v4 = 16; } else { v4 = 8; } return (unsigned int)xstrtoumax(s, 0LL, v4, a2, "Bb") == 0; }
static void diffarg (char const *a) { static size_t diffargs, diffarglim; if (diffargs == diffarglim) { if (! diffarglim) diffarglim = 16; else if ( (9223372036854775807L) / (2 * sizeof *diffargv) <= diffarglim) xalloc_die (); else diffarglim *= 2; diffargv = xrealloc (diffargv, diffarglim * sizeof *diffargv); } diffargv[diffargs++] = a; }
void diffarg(unsigned long long a0) { int tmp_20; unsigned long long v1; if (diffargs.5420 == diffarglim.5421) { if (!diffarglim.5421) { diffarglim.5421 = 16; } else if (diffarglim.5421 <= 576460752303423486) { diffarglim.5421 = diffarglim.5421 * 2; } else { xalloc_die(); } diffargv = xrealloc(diffargv, diffarglim.5421 * 8, diffarglim.5421 * 8); } tmp_20 = diffargs.5420; diffargs.5420 = diffargs.5420 + 1; v1 = a0; *((diffargv + tmp_20 * 8)) = a0; 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; }
char * expand_authorized_keys(const char *filename, struct passwd *pw) { char *file, uidstr[32], ret[ 4096 ]; int i; snprintf(uidstr, sizeof(uidstr), "%llu", (unsigned long long)pw->pw_uid); file = percent_expand(filename, "h", pw->pw_dir, "u", pw->pw_name, "U", uidstr, (char *) ((void *)0) ); if (path_absolute(file)) return (file); i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file); if (i < 0 || (size_t)i >= sizeof(ret)) sshfatal("auth.c", __func__, 404, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "expand_authorized_keys: path too long"); free(file); return (xstrdup(ret)); }
void expand_authorized_keys(unsigned long long a0, struct_0 *a1) { void* v0; unsigned int v1; void* v2; char v3; char v4; char v5; unsigned long long v8; unsigned long long v9; v5 = *(&v5); snprintf(&v3, 0x20, "%llu", a1->field_10); v0 = 0; *(&v2) = percent_expand(a0, "h", a1->field_20, "u", a1->field_0, "U", &v3); if (path_absolute(v2)) { v8 = v2; return; } v1 = snprintf(&v4, 0x1000, "%s/%s", a1->field_20, v2); if (v1 < 0 || v1 > 4095) sshfatal("auth.c", "expand_authorized_keys", 0x194, 0x0, 0x1, 0x0, "expand_authorized_keys: path too long"); free(v2); v9 = xstrdup(&v4); return; }
int test_builtin (list) WORD_LIST *list; { char **argv; int argc, result; if (list == 0) { if (this_command_name[0] == '[' && !this_command_name[1]) { builtin_error (gettext("missing `]'")); return (2); } return (1); } argv = make_builtin_argv (list, &argc); result = test_command (argc, argv); sh_xfree(((char *)argv), "./test.def", 156); return (result); }
long long test_builtin(unsigned long long a0) { char v0; unsigned int v1; unsigned long long v2; unsigned long long v4; if (a0) { v2 = make_builtin_argv(a0, &v0, &v0); v1 = test_command(*(&v0), v2, v2); sh_xfree(v2, "./test.def", 0x9c); v4 = v1; } else { if (*(this_command_name) == 91 && !*((this_command_name + 1))) { builtin_error(gettext("missing `]'")); v4 = 2; goto LABEL_4000b3; } v4 = 1; } LABEL_4000b3: return v4; }
static void free_dollar_vars () { int i; for (i = 1; i < 10; i++) { do { if (dollar_vars[i]) sh_xfree((dollar_vars[i]), "variables.c", 5602); } while (0); dollar_vars[i] = (char *) ((void *)0) ; } }
void free_dollar_vars() { unsigned int v0; unsigned long long v2; for (v0 = 1; v0 <= 9; v0 += 1) { if (nameref_invalid_value[v0]) sh_xfree(nameref_invalid_value[v0], "variables.c", 0x15e2); v2 = &nameref_invalid_value[0]; nameref_invalid_value[v0] = 0; } return; }
static void print_heredoc_bodies (heredocs) REDIRECT *heredocs; { REDIRECT *hdtail; cprintf ("\n"); for (hdtail = heredocs; hdtail; hdtail = hdtail->next) { print_heredoc_body (hdtail); cprintf ("\n"); } was_heredoc = 1; }
void print_heredoc_bodies(undefined8 *param_1) { undefined8 *local_10; cprintf(&DAT_0010359f); for (local_10 = param_1; local_10 != (undefined8 *)0x0; local_10 = (undefined8 *)*local_10) { print_heredoc_body(local_10); cprintf(&DAT_0010359f); } was_heredoc = 1; return; }
static long parse_number (const char *arg) { char *endptr = ((void *)0) ; (*__errno_location ()) = 0; long result; if (strncmp (arg, "0x", 2) == 0) result = strtol (arg + 2, &endptr, 16); else if (strncmp (arg, "0", 1) == 0 && strspn (arg, "012345678") == strlen (optarg)) result = strtol (arg + 1, &endptr, 8); else result = strtol (arg, &endptr, 10); if ( (*__errno_location ()) != 0 || (endptr && *endptr != '\0')) error ( 1 , (*__errno_location ()) , "'%s' is not a recognizable number.", arg); return result; }
int parse_number(char *a0) { void* v0; unsigned long v1; v0 = 0; *(__errno_location()) = 0; if (!strncmp(a0, "0x", 0x2)) { v1 = strtol(a0 + 2, &v0, 0x10); } else if (strncmp(a0, "0", 0x1) || strspn(a0, "012345678") != strlen(*(got.optarg))) { v1 = strtol(a0, &v0, 0xa); } else { v1 = strtol(a0 + 1, &v0, 0x8); } if (!*(__errno_location())) { if (!v0) { return v1; } else if (!*(v0)) { return v1; } } error(0x1, *(__errno_location()), "'%s' is not a recognizable number."); }
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 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 *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; for (v1[0] = &v4; v1[0] && strcmp(a0, v1[0]); 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: *(&v3) = (!strcmp(a0, "[") ? a0 : "test"); printf(gettext("Full documentation <%s%s>\n")); printf(gettext("or available locally via: info '(coreutils) %s%s'\n")); v22 = *(&v18) ^ v21[5]; return; }
static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) { char s2[64]; __u16 prefixlen; __u8 ttl = 0; __u8 tos = 0; if (!tb) return; if (tb[IFLA_IPTUN_COLLECT_METADATA]) { print_bool(PRINT_ANY, "external", "external ", 1 ); } if (tb[IFLA_IPTUN_PROTO]) { switch (rta_getattr_u8(tb[IFLA_IPTUN_PROTO])) { case IPPROTO_IPIP : print_string(PRINT_ANY, "proto", "%s ", "ipip"); break; case IPPROTO_IPV6 : print_string(PRINT_ANY, "proto", "%s ", "ip6ip"); break; case IPPROTO_MPLS : print_string(PRINT_ANY, "proto", "%s ", "mplsip"); break; case 0: print_string(PRINT_ANY, "proto", "%s ", "any"); break; } } tnl_print_endpoint("remote", tb[IFLA_IPTUN_REMOTE], 2 ); tnl_print_endpoint("local", tb[IFLA_IPTUN_LOCAL], 2 ); if (tb[IFLA_IPTUN_LINK]) { __u32 link = rta_getattr_u32(tb[IFLA_IPTUN_LINK]); if (link) { print_string(PRINT_ANY, "link", "dev %s ", ll_index_to_name(link)); } } if (tb[IFLA_IPTUN_TTL]) ttl = rta_getattr_u8(tb[IFLA_IPTUN_TTL]); if (is_json_context() || ttl) print_uint(PRINT_ANY, "ttl", "ttl %u ", ttl); else print_string(PRINT_FP, ((void *)0) , "ttl %s ", "inherit"); if (tb[IFLA_IPTUN_TOS]) tos = rta_getattr_u8(tb[IFLA_IPTUN_TOS]); if (tos) { if (is_json_context() || tos != 1) print_0xhex(PRINT_ANY, "tos", "tos %#llx ", tos); else print_string(PRINT_FP, ((void *)0) , "tos %s ", "inherit"); } if (tb[IFLA_IPTUN_PMTUDISC] && rta_getattr_u8(tb[IFLA_IPTUN_PMTUDISC])) print_bool(PRINT_ANY, "pmtudisc", "pmtudisc ", 1 ); else print_bool(PRINT_ANY, "pmtudisc", "nopmtudisc ", 0 ); if (tb[IFLA_IPTUN_FLAGS]) { __u16 iflags = rta_getattr_u16(tb[IFLA_IPTUN_FLAGS]); if (iflags & 0x0001) print_bool(PRINT_ANY, "isatap", "isatap ", 1 ); } if (tb[IFLA_IPTUN_6RD_PREFIXLEN] && (prefixlen = rta_getattr_u16(tb[IFLA_IPTUN_6RD_PREFIXLEN]))) { __u16 relayprefixlen = rta_getattr_u16(tb[IFLA_IPTUN_6RD_RELAY_PREFIXLEN]); __u32 relayprefix = rta_getattr_u32(tb[IFLA_IPTUN_6RD_RELAY_PREFIX]); const char *prefix = inet_ntop( 10 , ((void*)(((char*)(tb[IFLA_IPTUN_6RD_PREFIX])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), s2, sizeof(s2)); if (is_json_context()) { print_string(PRINT_JSON, "prefix", ((void *)0) , prefix); print_int(PRINT_JSON, "prefixlen", ((void *)0) , prefixlen); if (relayprefix) { print_string(PRINT_JSON, "relay_prefix", ((void *)0) , format_host( 2 , 4, &relayprefix)); print_int(PRINT_JSON, "relay_prefixlen", ((void *)0) , relayprefixlen); } } else { printf("6rd-prefix %s/%u ", prefix, prefixlen); if (relayprefix) { printf("6rd-relay_prefix %s/%u ", format_host( 2 , 4, &relayprefix), relayprefixlen); } } } if (tb[IFLA_IPTUN_FWMARK]) { __u32 fwmark = rta_getattr_u32(tb[IFLA_IPTUN_FWMARK]); if (fwmark) { print_0xhex(PRINT_ANY, "fwmark", "fwmark %#llx ", fwmark); } } tnl_print_encap(tb, IFLA_IPTUN_ENCAP_TYPE, IFLA_IPTUN_ENCAP_FLAGS, IFLA_IPTUN_ENCAP_SPORT, IFLA_IPTUN_ENCAP_DPORT); }
long long iptunnel_print_opt(unsigned long a0, unsigned long a1, unsigned long long a2[21]) { unsigned long v0; unsigned long v1; char v2; char v3; unsigned short v4; unsigned short v5; unsigned short v6; unsigned int v7; unsigned int v8; unsigned int v9; unsigned long long v10; char v11; unsigned long long v13; unsigned long long v14; unsigned long long v15; unsigned long long v16; v1 = a0; v0 = a1; v2 = 0; v3 = 0; if (a2) { if (a2[19]) print_bool(0x4, "external", "external ", 0x1); if (a2[9]) { v13 = rta_getattr_u8(a2[9]); if (v13 == 137) { print_string(0x4, "proto", "%s ", "mplsip"); } else if (v13 <= 137) { if (v13 == 41) { print_string(0x4, "proto", "%s ", "ip6ip"); } else if (v13 <= 41) { if (!v13) { print_string(0x4, "proto", "%s ", "any"); } else if (v13 == 4) { print_string(0x4, "proto", "%s ", "ipip"); } } } } tnl_print_endpoint("remote", a2[3], 0x2); tnl_print_endpoint("local", a2[2], 0x2); if (a2[1]) { v8 = rta_getattr_u32(a2[1]); if (v8) print_string(0x4, "link", "dev %s ", ll_index_to_name(v8)); } if (a2[4]) v2 = rta_getattr_u8(a2[4]); v14 = is_json_context(); if (!v14 && !v2) print_string(0x1, 0x0, "ttl %s ", "inherit"); if (v2 || v14) print_uint(0x4, "ttl", "ttl %u ", v2); if (a2[5]) v3 = rta_getattr_u8(a2[5]); if (v3) { v15 = is_json_context(); if (!v15 && v3 == 1) print_string(0x1, 0x0, "tos %s ", "inherit"); if (v3 != 1 || v15) print_0xhex(0x4, "tos", "tos %#llx ", v3); } if (a2[10]) { v16 = rta_getattr_u8(a2[10]); if (v16) print_bool(0x4, "pmtudisc", "pmtudisc ", 0x1); } if (!v16 || !a2[10]) print_bool(0x4, "pmtudisc", "nopmtudisc ", 0x0); if (a2[8]) { v4 = rta_getattr_u16(a2[8]); if ((v4 & 1)) print_bool(0x4, "isatap", "isatap ", 0x1); } if (a2[13]) { v5 = rta_getattr_u16(a2[13]); if (v5) { v6 = rta_getattr_u16(a2[14]); v7 = rta_getattr_u32(a2[12]); v10 = inet_ntop(0xa, a2[11] + 4, &v11, 0x40); if (is_json_context()) { print_string(0x2, "prefix", 0x0, v10); print_int(0x2, "prefixlen", 0x0, v5); if (v7) { print_string(0x2, "relay_prefix", 0x0, format_host(0x2, 0x4, &v7)); print_int(0x2, "relay_prefixlen", 0x0, v6); } } else { printf("6rd-prefix %s/%u ", v10, v5); if (v7) printf("6rd-relay_prefix %s/%u ", format_host(0x2, 0x4, &v7), v6); } } } if (a2[20]) { v9 = rta_getattr_u32(a2[20]); if (v9) print_0xhex(0x4, "fwmark", "fwmark %#llx ", v9); } tnl_print_encap(a2, 0xf, 0x10, 0x11, 0x12); } return 0; }
inline int lchmodat (int fd, char const *file, mode_t mode) { return fchmodat (fd, file, mode, 0x100 ); }
void lchmodat(void) { halt_baddata(); }
int rl_vi_change_char (int count, int key) { int c; char mb[ 16 +1]; if (_rl_vi_redoing) { strncpy (mb, _rl_vi_last_replacement, 16 ); c = (unsigned char)_rl_vi_last_replacement[0]; mb[ 16 ] = '\0'; } else if ((rl_readline_state & (0x0080000))) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_func = _rl_vi_callback_change_char; return (0); } else { c = _rl_vi_callback_getchar (mb, 16 ); if (c < 0) return -1; if ( (__ctype_get_mb_cur_max ()) > 1 && rl_byte_oriented == 0) strncpy (_rl_vi_last_replacement, mb, 16 ); else _rl_vi_last_replacement[0] = c; _rl_vi_last_replacement[ 16 ] = '\0'; } if (c < 0) return -1; return (_rl_vi_change_char (count, c, mb)); }
long rl_vi_change_char(int a1, unsigned int a2, long a3) { int v4; int v7; if ( a2 == 27 || a2 == 3 ) return 0xFFFFFFFFLL; rl_begin_undo_group(); while ( 1 ) { v4 = a1--; if ( !v4 || rl_point >= rl_end ) break; v7 = rl_point; rl_vi_delete(1u, a2); if ( v7 > rl_point ) rl_vi_append_forward(); if ( _ctype_get_mb_cur_max() <= 1 || rl_byte_oriented ) rl_insert_char(1LL, a2); else rl_insert_text(a3); } rl_backward_char(1LL, a2); rl_end_undo_group(); return 0LL; }
static inline char * timetostr (time_t t, char *buf) { return ((! ((time_t) 0 < (time_t) -1)) ? imaxtostr (t, buf) : umaxtostr (t, buf)); }
void timetostr(undefined8 param_1,undefined8 param_2) { imaxtostr(param_1,param_2); return; }
static int glob1(Char *pattern, Char *pattern_last, _ssh_compat_glob_t *pglob, struct glob_lim *limitp) { Char pathbuf[ 4096 ]; if (*pattern == '\0') return(0); return(glob2(pathbuf, pathbuf+ 4096 -1, pathbuf, pathbuf+ 4096 -1, pattern, pattern_last, pglob, limitp)); }
int glob1(unsigned short *a0, unsigned long long a1, unsigned long long a2, unsigned long long a3) { char v0; char v1; char v2; char v3; unsigned int v5; v2 = *(&v2); v1 = *(&v1); if (!*(a0)) v5 = 0; else v5 = glob2(&v0, &v3, &v0, &v3, a0, a1, a2, a3); return v5; }
int sshkey_load_cert(const char *filename, struct sshkey **keyp) { struct sshkey *pub = ((void *)0) ; char *file = ((void *)0) ; int r = -1; if (keyp != ((void *)0) ) *keyp = ((void *)0) ; if (asprintf(&file, "%s-cert.pub", filename) == -1) return -2; r = sshkey_try_load_public(keyp, file, ((void *)0) ); free(file); sshkey_free(pub); return r; }
long long sshkey_load_cert(unsigned long a0, unsigned long long *a1) { unsigned int v0; void* v1; void* v2; unsigned long long v5; v2 = 0; v1 = 0; v0 = -1; if (a1) *(a1) = 0; if (asprintf(&v1, "%s-cert.pub", a0) == -1) { v5 = 4294967294; } else { v0 = sshkey_try_load_public(a1, v1, 0x0); free(v1); sshkey_free(v2); v5 = v0; } return v5; }
static _Bool validate_file_name (char *file, _Bool check_basic_portability, _Bool check_extra_portability) { size_t filelen = strlen (file); char *start; _Bool check_component_lengths; _Bool file_exists = 0 ; if (check_extra_portability && ! no_leading_hyphen (file)) return 0 ; if ((check_basic_portability || check_extra_portability) && filelen == 0) { error (0, 0, gettext ("empty file name")); return 0 ; } if (check_basic_portability) { if (! portable_chars_only (file, filelen)) return 0 ; } else { struct stat st; if (lstat (file, &st) == 0) file_exists = 1 ; else if ( (*__errno_location ()) != 2 || filelen == 0) { error (0, (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, file)); return 0 ; } } if (check_basic_portability || (! file_exists && 256 <= filelen)) { size_t maxsize; if (check_basic_portability) maxsize = 256 ; else { long int size; char const *dir = (*file == '/' ? "/" : "."); (*__errno_location ()) = 0; size = pathconf (dir, _PC_PATH_MAX ); if (size < 0 && (*__errno_location ()) != 0) { error (0, (*__errno_location ()) , gettext ("%s: unable to determine maximum file name length"), dir); return 0 ; } maxsize = ((( size )<(0x7fffffffffffffffL))?( size ):(0x7fffffffffffffffL)) ; } if (maxsize <= filelen) { unsigned long int len = filelen; unsigned long int maxlen = maxsize - 1; error (0, 0, gettext ("limit %lu exceeded by length %lu of file name %s"), maxlen, len, quotearg_style (shell_escape_always_quoting_style, file)); return 0 ; } } check_component_lengths = check_basic_portability; if (! check_component_lengths && ! file_exists) { for (start = file; *(start = component_start (start)); ) { size_t length = component_len (start); if ( 14 < length) { check_component_lengths = 1 ; break; } start += length; } } if (check_component_lengths) { size_t name_max = 14 ; size_t known_name_max = (check_basic_portability ? 14 : 0); for (start = file; *(start = component_start (start)); ) { size_t length; if (known_name_max) name_max = known_name_max; else { long int len; char const *dir = (start == file ? "." : file); char c = *start; (*__errno_location ()) = 0; *start = '\0'; len = pathconf (dir, _PC_NAME_MAX ); *start = c; if (0 <= len) name_max = ((( len )<(0x7fffffffffffffffL))?( len ):(0x7fffffffffffffffL)) ; else switch ( (*__errno_location ()) ) { case 0: name_max = (18446744073709551615UL) ; break; case 2 : known_name_max = name_max; break; default: *start = '\0'; error (0, (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, dir)); *start = c; return 0 ; } } length = component_len (start); if (name_max < length) { unsigned long int len = length; unsigned long int maxlen = name_max; char c = start[len]; start[len] = '\0'; error (0, 0, gettext ("limit %lu exceeded by length %lu " "of file name component %s") , maxlen, len, quote (start)); start[len] = c; return 0 ; } start += length; } } return 1 ; }
undefined8 validate_file_name(char *param_1,char param_2,char param_3) { bool bVar1; char cVar2; int iVar3; size_t sVar4; undefined8 uVar5; char *pcVar6; undefined8 uVar7; int *piVar8; ulong uVar9; long in_FS_OFFSET; char local_134; char *local_130; ulong local_128; ulong local_120; ulong local_118; stat local_b8; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); sVar4 = strlen(param_1); bVar1 = false; if ((param_3 == '\0') || (cVar2 = no_leading_hyphen(param_1), cVar2 == '\x01')) { if (((param_2 == '\0') && (param_3 == '\0')) || (sVar4 != 0)) { if (param_2 == '\0') { iVar3 = lstat(param_1,&local_b8); if (iVar3 == 0) { bVar1 = true; } else { piVar8 = __errno_location(); if ((*piVar8 != 2) || (sVar4 == 0)) { uVar5 = quotearg_n_style_colon(0,3,param_1); piVar8 = __errno_location(); error(0,*piVar8,&DAT_00101209,uVar5); uVar5 = 0; goto LAB_00100dba; } } } else { cVar2 = portable_chars_only(param_1,sVar4); if (cVar2 != '\x01') { uVar5 = 0; goto LAB_00100dba; } } if ((param_2 != '\0') || ((!bVar1 && (0xff < sVar4)))) { if (param_2 == '\0') { if (*param_1 == '/') { pcVar6 = "/"; } else { pcVar6 = "."; } piVar8 = __errno_location(); *piVar8 = 0; local_128 = pathconf(pcVar6,4); if (((long)local_128 < 0) && (piVar8 = __errno_location(), *piVar8 != 0)) { uVar5 = gettext("%s: unable to determine maximum file name length"); piVar8 = __errno_location(); error(0,*piVar8,uVar5,pcVar6); uVar5 = 0; goto LAB_00100dba; } } else { local_128 = 0x100; } if (local_128 <= sVar4) { uVar5 = quotearg_style(4,param_1); uVar7 = gettext("limit %lu exceeded by length %lu of file name %s"); error(0,0,uVar7,local_128 - 1,sVar4,uVar5); uVar5 = 0; goto LAB_00100dba; } } local_134 = param_2; if ((param_2 != '\x01') && (local_130 = param_1, !bVar1)) { while (local_130 = (char *)component_start(local_130), *local_130 != '\0') { uVar9 = component_len(local_130); if (0xe < uVar9) { local_134 = '\x01'; break; } local_130 = local_130 + uVar9; } } if (local_134 != '\0') { local_120 = 0xe; if (param_2 == '\0') { local_118 = 0; local_130 = param_1; } else { local_118 = 0xe; local_130 = param_1; } while (local_130 = (char *)component_start(local_130), *local_130 != '\0') { if (local_118 == 0) { pcVar6 = param_1; if (local_130 == param_1) { pcVar6 = "."; } cVar2 = *local_130; piVar8 = __errno_location(); *piVar8 = 0; *local_130 = '\0'; uVar9 = pathconf(pcVar6,3); *local_130 = cVar2; if ((long)uVar9 < 0) { piVar8 = __errno_location(); if (*piVar8 == 0) { local_120 = 0xffffffffffffffff; uVar9 = local_120; } else { if (*piVar8 != 2) { *local_130 = '\0'; uVar5 = quotearg_n_style_colon(0,3,pcVar6); piVar8 = __errno_location(); error(0,*piVar8,&DAT_00101209,uVar5); *local_130 = cVar2; uVar5 = 0; goto LAB_00100dba; } local_118 = local_120; uVar9 = local_120; } } } else { local_120 = local_118; uVar9 = local_120; } local_120 = uVar9; uVar9 = component_len(local_130); if (local_120 < uVar9) { cVar2 = local_130[uVar9]; local_130[uVar9] = '\0'; uVar5 = quote(local_130); uVar7 = gettext("limit %lu exceeded by length %lu of file name component %s"); error(0,0,uVar7,local_120,uVar9,uVar5); local_130[uVar9] = cVar2; uVar5 = 0; goto LAB_00100dba; } local_130 = local_130 + uVar9; } } uVar5 = 1; } else { uVar5 = gettext("empty file name"); error(0,0,uVar5); uVar5 = 0; } } else { uVar5 = 0; } LAB_00100dba: if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) { return uVar5; } __stack_chk_fail(); }
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); }
int add_passwd(void* a0, unsigned long a1) { unsigned long long v0; unsigned long long v1[9]; unsigned long long v2; unsigned long v3; unsigned long long v4; unsigned long v5; unsigned long v6; unsigned long v7; unsigned long v8; unsigned long v9; unsigned long v10; unsigned long v11; unsigned long v12; unsigned long v13; unsigned int v15; v0 = 0; if (crypt_method && sflg) { if (strcmp(crypt_method, "SHA256") && !(!strcmp(crypt_method, "SHA512"))) goto LABEL_400e57; v0 = &sha_rounds; } LABEL_400e57: if ((is_shadow ^ 1)) { v15 = update_passwd(a0, a1); } else { v1[0] = spw_locate(*(a0)); if (v1) { v5 = v1[0]; v6 = v1[1]; v7 = v1[2]; v8 = v1[3]; v9 = v1[4]; v10 = v1[5]; v11 = v1[6]; v12 = v1[7]; v13 = v1[8]; if (crypt_method && !strcmp(crypt_method, "NONE")) { v6 = a1; goto LABEL_400fbd; } v4 = crypt_make_salt(crypt_method, v0, v0); v3 = pw_encrypt(a1, v4, v4); if (v3) { v6 = v3; } else { strerror(*(__errno_location())); fprintf(*(&stderr), gettext("%s: failed to crypt password with salt '%s': %s\n")); v15 = 1; goto LABEL_4011db; } LABEL_400fbd: v15 = gettime(); v7 = (v15 * 1749024623285053783 >> 64 >> 13) - (v15 >> 63); if (!v7) v7 = -1; v15 = !spw_update(&v5); } else if (strcmp(a0[8], "x")) { v15 = update_passwd(a0, a1); } else { v5 = *(a0); if (crypt_method && !strcmp(crypt_method, "NONE")) { v6 = a1; goto LABEL_40112c; } v2 = crypt_make_salt(crypt_method, v0, v0); v3 = pw_encrypt(a1, v2, v2); if (v3) { v6 = v3; } else { strerror(*(__errno_location())); fprintf(*(&stderr), gettext("%s: failed to crypt password with salt '%s': %s\n")); v15 = 1; goto LABEL_4011db; } LABEL_40112c: v15 = gettime(); v7 = (v15 * 1749024623285053783 >> 64 >> 13) - (v15 >> 63); if (!v7) v7 = -1; v8 = getdef_num("PASS_MIN_DAYS", 0x0); v9 = getdef_num("PASS_MAX_DAYS", 0x2710); v10 = getdef_num("PASS_WARN_AGE", 0xffffffff); v11 = -1; v12 = -1; v13 = -1; v15 = !spw_update(&v5); } } LABEL_4011db: return v15; }
static void interrupt_handler (int sig) { if (! 0x80000000 ) signal (sig, ((__sighandler_t) 0) ); interrupt_signal = sig; }
long long interrupt_handler(unsigned long a0) { interrupt_signal = a0; return a0; }
void crypto_sign_ed25519_ref_sc25519_window5(signed char r[51], const crypto_sign_ed25519_ref_sc25519 *s) { char carry; int i; for(i=0;i<6;i++) { r[8*i+0] = s->v[5*i+0] & 31; r[8*i+1] = (s->v[5*i+0] >> 5) & 31; r[8*i+1] ^= (s->v[5*i+1] << 3) & 31; r[8*i+2] = (s->v[5*i+1] >> 2) & 31; r[8*i+3] = (s->v[5*i+1] >> 7) & 31; r[8*i+3] ^= (s->v[5*i+2] << 1) & 31; r[8*i+4] = (s->v[5*i+2] >> 4) & 31; r[8*i+4] ^= (s->v[5*i+3] << 4) & 31; r[8*i+5] = (s->v[5*i+3] >> 1) & 31; r[8*i+6] = (s->v[5*i+3] >> 6) & 31; r[8*i+6] ^= (s->v[5*i+4] << 2) & 31; r[8*i+7] = (s->v[5*i+4] >> 3) & 31; } r[8*i+0] = s->v[5*i+0] & 31; r[8*i+1] = (s->v[5*i+0] >> 5) & 31; r[8*i+1] ^= (s->v[5*i+1] << 3) & 31; r[8*i+2] = (s->v[5*i+1] >> 2) & 31; carry = 0; for(i=0;i<50;i++) { r[i] += carry; r[i+1] += r[i] >> 5; r[i] &= 31; carry = r[i] >> 4; r[i] -= carry<<5; } r[50] += carry; }
long long crypto_sign_ed25519_ref_sc25519_window5(unsigned long a0, unsigned int *a1) { char v0[51]; char v1; unsigned int v2; unsigned int v4; unsigned int v5; unsigned long long v6; unsigned int v7; unsigned int v8; unsigned int v9; unsigned int v10; unsigned int v11; unsigned int v13; unsigned int v17; unsigned int v20; unsigned int v23; unsigned int v27; unsigned long long v29; *(&v0[0]) = a0; for (v2 = 0; v2 <= 5; v2 = __addvsi3(v2, 0x1, v29)) { v4 = a1[__mulvsi3(v2, 0x5)]; *(&v4) = v4 & 31; v0[__mulvsi3(v2, 0x8)] = *(&v4); v5 = a1[__mulvsi3(v2, 0x5)] >> 5; *(&v5) = v5 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)] = *(&v5); v7 = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)]; *(&v7) = v7 ^ (a1[__addvsi3(__mulvsi3(v2, 0x5), 0x1, v6)] * 8) & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)] = v7; v8 = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x1, v6)] >> 2; *(&v8) = v8 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)] = *(&v8); v9 = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x1, v6)] >> 7; *(&v9) = v9 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x3, v6)] = *(&v9); v10 = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x3, v6)]; *(&v10) = v10 ^ a1[__addvsi3(__mulvsi3(v2, 0x5), 0x2, v6)] * 2 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x3, v6)] = v7; v11 = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x2, v6)] >> 4; *(&v11) = v11 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x4, v6)] = *(&v11); v13 = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x4, v6)]; *(&v13) = v13 ^ (a1[__addvsi3(__mulvsi3(v2, 0x5), 0x3, v6)] * 16) & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x4, v6)] = v7; v17 = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x3, v6)] >> 1; *(&v17) = v17 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x5, v6)] = *(&v17); v20 = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x3, v6)] >> 6; *(&v20) = v20 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x6, v6)] = *(&v20); v23 = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x6, v6)]; *(&v23) = v23 ^ (a1[__addvsi3(__mulvsi3(v2, 0x5), 0x4, v6)] * 4) & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x6, v6)] = v7; v27 = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x4, v6)] >> 3; v29 = v27 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x7, v6)] = v29; } *(&v29) = a1[__mulvsi3(v2, 0x5)]; *(&v29) = v29 & 31; v0[__mulvsi3(v2, 0x8)] = *(&v29); *(&v29) = a1[__mulvsi3(v2, 0x5)] >> 5; *(&v29) = v29 & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)] = *(&v29); *(&v29) = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)]; *(&v29) = v29 ^ (a1[__addvsi3(__mulvsi3(v2, 0x5), 0x1, v6)] * 8) & 31; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)] = v7; *(&v29) = a1[__addvsi3(__mulvsi3(v2, 0x5), 0x1, v6)] >> 2; v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)] = v29 & 31; v1 = 0; for (v2 = 0; v2 <= 49; v2 = __addvsi3(v2, 0x1, v0[v2] - (v1 * 32))) { v0[v2] = v0[v2] + v1; *(&v29) = v0[__addvsi3(v2, 0x1, v0[v2] + v1)] + (v0[v2] >> 5); v0[__addvsi3(v2, 0x1, v2)] = v7; v0[v2] = v0[v2] & 31; v1 = v0[v2] >> 4; v0[v2] = v0[v2] - (v1 * 32); } v0[50] = v0[50] + v1; return &v0[50]; }
void sl_free(StringList *sl, int all) { size_t i; if (sl == ((void *)0) ) return; if (sl->sl_str) { if (all) for (i = 0; i < sl->sl_cur; i++) free(sl->sl_str[i]); free(sl->sl_str); } free(sl); }
void sl_free(void **param_1,int param_2) { void *local_10; if (param_1 != (void **)0x0) { if (*param_1 != (void *)0x0) { if (param_2 != 0) { for (local_10 = (void *)0x0; local_10 < param_1[2]; local_10 = (void *)((long)local_10 + 1)) { free(*(void **)((long)*param_1 + (long)local_10 * 8)); } } free(*param_1); } free(param_1); } return; }
static void users (char const *filename, int options) { size_t n_users; STRUCT_UTMP *utmp_buf; if (read_utmp (filename, &n_users, &utmp_buf, options) != 0) ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); list_entries_users (n_users, utmp_buf); free (utmp_buf); }
unsigned long users(long a1, unsigned int a2) { const char *v2; int *v3; long v5; void *ptr; unsigned long v7; v7 = __readfsqword(0x28u); if ( (unsigned int)read_utmp(a1, &v5, &ptr, a2) ) { v2 = (const char *)quotearg_n_style_colon(0LL, 3LL, a1); v3 = _errno_location(); error(1, *v3, "%s", v2); } list_entries_users(v5, (long)ptr); free(ptr); return __readfsqword(0x28u) ^ v7; }
static int history_def_init(void **p, HistEvent *ev __attribute__((__unused__)), int n) { history_t *h = (history_t *) malloc(sizeof(*h)); if (h == ((void *)0) ) return -1; if (n <= 0) n = 0; h->eventid = 0; h->cur = 0; h->max = n; h->list.next = h->list.prev = &h->list; h->list.ev.str = ((void *)0) ; h->list.ev.num = 0; h->cursor = &h->list; h->flags = 0; *p = h; return 0; }
long history_def_init(_QWORD *a1, long a2, int a3) { _DWORD *v5; v5 = malloc(0x40uLL); if ( !v5 ) return 0xFFFFFFFFLL; if ( a3 <= 0 ) a3 = 0; v5[14] = 0; v5[13] = 0; v5[12] = a3; *((_QWORD *)v5 + 4) = v5; *((_QWORD *)v5 + 3) = *((_QWORD *)v5 + 4); *((_QWORD *)v5 + 1) = 0LL; *v5 = 0; *((_QWORD *)v5 + 5) = v5; v5[15] = 0; *a1 = v5; return 0LL; }
struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx) { struct dir_info_iter *iter; iter = e2fsck_allocate_memory(ctx, sizeof(struct dir_info_iter), "dir_info iterator"); if (ctx->dir_info->tdb) iter->tdb_iter = ext2fs_tdb_firstkey(ctx->dir_info->tdb); return iter; }
long e2fsck_dir_info_iter_begin(long a1) { long v1; long memory; memory = e2fsck_allocate_memory(a1, 24LL, "dir_info iterator"); if ( *(_QWORD *)(*(_QWORD *)(a1 + 560) + 32LL) ) { *(_QWORD *)(memory + 8) = ext2fs_tdb_firstkey(*(_QWORD *)(*(_QWORD *)(a1 + 560) + 32LL)); *(_QWORD *)(memory + 16) = v1; } return memory; }
int do_handshake(socket_st * socket) { return 0; }
long do_handshake() { return 0LL; }
int find_procsub_child (pid) pid_t pid; { int i; if (nfds == 0) return -1; for (i = 0; i < totfds; i++) if (dev_fd_list[i] == pid) return i; return -1; }
long long find_procsub_child(unsigned long a0) { unsigned int v0; unsigned long long v2; if (!nfds) { v2 = 4294967295; return v2; } for (v0 = 0; v0 < totfds; v0 += 1) { if (a0 == *((dev_fd_list + (v0 << 2)))) { v2 = v0; return v2; } } v2 = 4294967295; return v2; }
static _Bool homogeneous_spec_list (struct Spec_list *s) { int b, c; s->state = ( (18446744073709551615UL) - 1); if ((b = get_next (s, ((void *)0) )) == -1) return 0 ; while ((c = get_next (s, ((void *)0) )) != -1) if (c != b) return 0 ; return 1 ; }
int homogeneous_spec_list(struct_0 *a0) { unsigned int v0; unsigned int v1; unsigned int v3; a0->field_10 = -2; v0 = get_next(a0, NULL); if (v0 == -1) { v3 = 0; } else { while (true) { v1 = get_next(a0, NULL); if (v1 != -1) { if (v1 == v0) continue; v3 = 0; break; } else { v3 = 1; break; } } } return v3; }
static void decode_preserve_arg (char const *arg, struct cp_options *x, _Bool on_off) { enum File_attribute { PRESERVE_MODE, PRESERVE_TIMESTAMPS, PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_XATTR, PRESERVE_ALL }; static enum File_attribute const preserve_vals[] = { PRESERVE_MODE, PRESERVE_TIMESTAMPS, PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_XATTR, PRESERVE_ALL }; static char const *const preserve_args[] = { "mode", "timestamps", "ownership", "links", "context", "xattr", "all", ((void *)0) }; _Static_assert ((sizeof (preserve_args) / sizeof *(preserve_args)) == (sizeof (preserve_vals) / sizeof *(preserve_vals)) + 1, "verify (" "ARRAY_CARDINALITY (preserve_args) == ARRAY_CARDINALITY (preserve_vals) + 1" ")"); char *arg_writable = xstrdup (arg); char *s = arg_writable; do { char *comma = strchr (s, ','); enum File_attribute val; if (comma) *comma++ = 0; val = ((preserve_vals) [__xargmatch_internal (on_off ? "--preserve" : "--no-preserve", s, preserve_args, (void const *) (preserve_vals), sizeof *(preserve_vals), argmatch_die, 1 )]) ; switch (val) { case PRESERVE_MODE: x->preserve_mode = on_off; x->explicit_no_preserve_mode = !on_off; break; case PRESERVE_TIMESTAMPS: x->preserve_timestamps = on_off; break; case PRESERVE_OWNERSHIP: x->preserve_ownership = on_off; break; case PRESERVE_LINK: x->preserve_links = on_off; break; case PRESERVE_CONTEXT: x->require_preserve_context = on_off; x->preserve_security_context = on_off; break; case PRESERVE_XATTR: x->preserve_xattr = on_off; x->require_preserve_xattr = on_off; break; case PRESERVE_ALL: x->preserve_mode = on_off; x->preserve_timestamps = on_off; x->preserve_ownership = on_off; x->preserve_links = on_off; x->explicit_no_preserve_mode = !on_off; if (selinux_enabled) x->preserve_security_context = on_off; x->preserve_xattr = on_off; break; default: abort (); } s = comma; } while (s); free (arg_writable); }
void decode_preserve_arg(unsigned long long a0, struct_0 *a1, unsigned long a2) { unsigned long long v0; unsigned int v1; char *v2; char *v3; void* v4; char *v6; unsigned long long v7; unsigned long long v8; v4 = xstrdup(a0); v2 = v4; while (true) { v3 = strchr(v2, 0x2c); if (v3) { v6 = v3; v3 += 1; *(v6) = 0; } if (a2) v7 = "--preserve"; else v7 = "--no-preserve"; v0 = 1; *(&v7) = *((4 * __xargmatch_internal(v7, v2, &preserve_args.6771, &preserve_vals.6770, 0x4, argmatch_die) + &preserve_vals.6770)); v1 = v7; switch (v1) { case 0: a1[1].padding_0[0] = a2; a1[1].padding_0[2] = !(a2); break; case 1: a1[1].padding_0[1] = a2; break; case 2: a1->field_1d = a2; break; case 3: a1[1].padding_0[18] = a2; break; case 4: a1[1].padding_0[22] = a2; a1[1].padding_0[21] = a2; break; case 5: a1[1].padding_0[23] = a2; a1[1].padding_0[24] = a2; break; case 6: a1[1].padding_0[0] = a2; a1[1].padding_0[1] = a2; a1->field_1d = a2; a1[1].padding_0[18] = a2; a1[1].padding_0[2] = !(a2); if (selinux_enabled) a1[1].padding_0[21] = a2; a1[1].padding_0[23] = a2; break; default: abort(); } v2 = v3; if (!v2) { v8 = free(v4); return; } } }
static void print_numbers (char const *fmt, struct layout layout, long double first, long double step, long double last) { _Bool out_of_range = (step < 0 ? first < last : last < first); if (! out_of_range) { long double x = first; long double i; for (i = 1; ; i++) { long double x0 = x; if (printf (fmt, x) < 0) io_error (); if (out_of_range) break; x = first + i * step; out_of_range = (step < 0 ? x < last : last < x); if (out_of_range) { _Bool print_extra_number = 0 ; long double x_val; char *x_str; int x_strlen; if (locale_ok) setlocale ( 1 , "C"); x_strlen = asprintf (&x_str, fmt, x); if (locale_ok) setlocale ( 1 , ""); if (x_strlen < 0) xalloc_die (); x_str[x_strlen - layout.suffix_len] = '\0'; if (xstrtold (x_str + layout.prefix_len, ((void *)0) , &x_val, cl_strtold) && x_val == last) { char *x0_str = ((void *)0) ; int x0_strlen = asprintf (&x0_str, fmt, x0); if (x0_strlen < 0) xalloc_die (); x0_str[x0_strlen - layout.suffix_len] = '\0'; print_extra_number = !(strcmp (x0_str, x_str) == 0); free (x0_str); } free (x_str); if (! print_extra_number) break; } if (fputs_unlocked (separator, stdout ) == (-1) ) io_error (); } if (fputs_unlocked (terminator, stdout ) == (-1) ) io_error (); } }
void print_numbers(char *param_1,long param_2,long param_3) { bool bVar1; char cVar2; int iVar3; long in_FS_OFFSET; bool bVar4; float10 fVar5; float10 in_stack_00000008; float10 in_stack_00000018; float10 in_stack_00000028; char *local_68; char *local_60; float10 local_58; undefined8 local_48; undefined2 uStack64; float10 local_38; undefined8 local_28; undefined2 uStack32; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((float10)0 <= in_stack_00000018) { bVar1 = in_stack_00000028 < in_stack_00000008; } else { bVar1 = in_stack_00000008 < in_stack_00000028; } if (!bVar1) { local_48 = SUB108(in_stack_00000008,0); uStack64 = (undefined2)((unkuint10)in_stack_00000008 >> 0x40); local_38 = (float10)1; while( true ) { local_28 = local_48; uStack32 = uStack64; iVar3 = printf(param_1); if (iVar3 < 0) { io_error(); } if (bVar1) break; fVar5 = in_stack_00000008 + in_stack_00000018 * local_38; local_48 = SUB108(fVar5,0); uStack64 = (undefined2)((unkuint10)fVar5 >> 0x40); if ((float10)0 <= in_stack_00000018) { bVar1 = in_stack_00000028 < fVar5; } else { bVar1 = fVar5 < in_stack_00000028; } if (bVar1) { bVar4 = false; if (locale_ok != '\0') { setlocale(1,"C"); } iVar3 = asprintf(&local_68,param_1); if (locale_ok != '\0') { setlocale(1,""); } if (iVar3 < 0) { xalloc_die(); } local_68[iVar3 - param_3] = '\0'; cVar2 = xstrtold(local_68 + param_2,0,&local_58,uRam0000000000100d57); if ((cVar2 != '\0') && (in_stack_00000028 == local_58)) { local_60 = (char *)0x0; iVar3 = asprintf(&local_60,param_1); if (iVar3 < 0) { xalloc_die(); } local_60[iVar3 - param_3] = '\0'; iVar3 = strcmp(local_60,local_68); bVar4 = iVar3 != 0; free(local_60); } free(local_68); if (!bVar4) break; } iVar3 = fputs_unlocked(separator,stdout); if (iVar3 == -1) { io_error(); } local_38 = (float10)1 + local_38; } iVar3 = fputs_unlocked((char *)&terminator,stdout); if (iVar3 == -1) { io_error(); } } if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return; }
static struct ulong_range getulong_range(const char *str) { struct ulong_range result = { .first = (0x7fffffffffffffffL * 2UL + 1UL) , .last = 0 }; long long first, last; char *pos; (*__errno_location ()) = 0; first = strtoll(str, &pos, 10); if (('\0' == *str) || ('-' != *pos ) || ( 34 == (*__errno_location ()) ) || (first != (unsigned long int)first)) goto out; (*__errno_location ()) = 0; last = strtoll(pos + 1, &pos, 10); if (('\0' != *pos ) || ( 34 == (*__errno_location ()) ) || (last != (unsigned long int)last)) goto out; if (first > last) goto out; result.first = (unsigned long int)first; result.last = (unsigned long int)last; out: return result; }
int getulong_range(char *a0) { char v0; unsigned long v1; unsigned long v2; unsigned long long v3; void* v4; v3 = -1; v4 = 0; *(__errno_location()) = 0; v1 = strtoll(a0, &v0, 0xa); if (!*(a0)) { return v3; } else if (*(*(&v0)) != 45) { return v3; } else if (*(__errno_location()) == 34) { return v3; } else { *(__errno_location()) = 0; v2 = strtoll(*(&v0) + 1, &v0, 0xa); if (*(*(&v0))) { return v3; } else if (*(__errno_location()) != 34) { if (v1 <= v2) { v3 = v1; v4 = v2; } return v3; } else { return v3; } } }
static int request_permitted(const struct sftp_handler *h) { char *result; if (readonly && h->does_write) { sshlog("sftp-server.c", __func__, 198, 0, SYSLOG_LEVEL_VERBOSE, ((void *)0) , "Refusing %s request in read-only mode", h->name); return 0; } if (request_denylist != ((void *)0) && ((result = match_list(h->name, request_denylist, ((void *)0) ))) != ((void *)0) ) { free(result); sshlog("sftp-server.c", __func__, 204, 0, SYSLOG_LEVEL_VERBOSE, ((void *)0) , "Refusing denylisted %s request", h->name); return 0; } if (request_allowlist != ((void *)0) && ((result = match_list(h->name, request_allowlist, ((void *)0) ))) != ((void *)0) ) { free(result); sshlog("sftp-server.c", __func__, 210, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "Permitting allowlisted %s request", h->name); return 1; } if (request_allowlist != ((void *)0) ) { sshlog("sftp-server.c", __func__, 214, 0, SYSLOG_LEVEL_VERBOSE, ((void *)0) , "Refusing non-allowlisted %s request", h->name); return 0; } return 1; }
int request_permitted(struct_0 *a0) { unsigned long v0; void* v1; unsigned int v3; if (readonly && a0->field_20) { v0 = a0->field_0; sshlog("sftp-server.c", "request_permitted", 0xc6, 0x0, 0x4, 0x0, "Refusing %s request in read-only mode"); v3 = 0; goto LABEL_400296; } if (request_denylist) { v1 = match_list(a0->field_0, request_denylist, 0x0, request_denylist); if (v1) { free(v1); v0 = a0->field_0; sshlog("sftp-server.c", "request_permitted", 0xcc, 0x0, 0x4, 0x0, "Refusing denylisted %s request"); v3 = 0; goto LABEL_400296; } } if (request_allowlist) { v1 = match_list(a0->field_0, request_allowlist, 0x0, request_allowlist); if (v1) { free(v1); v0 = a0->field_0; sshlog("sftp-server.c", "request_permitted", 0xd2, 0x0, 0x6, 0x0, "Permitting allowlisted %s request"); v3 = 1; goto LABEL_400296; } } if (!request_allowlist) { v3 = 1; } else { v0 = a0->field_0; sshlog("sftp-server.c", "request_permitted", 0xd6, 0x0, 0x4, 0x0, "Refusing non-allowlisted %s request"); v3 = 0; } LABEL_400296: return v3; }
void print_word_list (list, separator) WORD_LIST *list; char *separator; { _print_word_list (list, separator, xprintf); }
long long print_word_list(unsigned long long a0, unsigned long long a1) { return _print_word_list(a0, a1, xprintf); }
SHELL_VAR * find_variable_no_invisible (name) const char *name; { SHELL_VAR *v; int flags; last_table_searched = 0; flags = 0x02; if (expanding_redir == 0 && (assigning_in_environment || executing_builtin)) flags |= 0x01; v = find_variable_internal (name, flags); if (v && ((((v)->attributes) & (0x0000800)))) v = find_variable_nameref (v); return v; }
long long find_variable_no_invisible(unsigned long long a0) { unsigned int v0; struct_0 *v1; last_table_searched = 0; v0 = 2; if (!expanding_redir && (assigning_in_environment || executing_builtin)) v0 |= 1; v1 = find_variable_internal(a0, v0); if (v1 && (v1->field_28 & 0x800)) v1 = find_variable_nameref(v1); return v1; }
static void writeline (struct linebuffer const *line, FILE *stream, int class) { switch (class) { case 1: if (!only_file_1) return; break; case 2: if (!only_file_2) return; if (only_file_1) fwrite_unlocked (col_sep,1,col_sep_len,stream); break; case 3: if (!both) return; if (only_file_1) fwrite_unlocked (col_sep,1,col_sep_len,stream); if (only_file_2) fwrite_unlocked (col_sep,1,col_sep_len,stream); break; } fwrite_unlocked (line->buffer,sizeof (char),line->length,stream); }
void writeline(long param_1,FILE *param_2,int param_3) { if (param_3 == 3) { if (both != '\x01') { return; } if (only_file_1 != '\0') { fwrite_unlocked(col_sep,1,col_sep_len,param_2); } if (only_file_2 != '\0') { fwrite_unlocked(col_sep,1,col_sep_len,param_2); } } else if (param_3 < 4) { if (param_3 == 1) { if (only_file_1 != '\x01') { return; } } else if (param_3 == 2) { if (only_file_2 != '\x01') { return; } if (only_file_1 != '\0') { fwrite_unlocked(col_sep,1,col_sep_len,param_2); } } } fwrite_unlocked(*(void **)(param_1 + 0x10),1,*(size_t *)(param_1 + 8),param_2); return; }
static _Bool reset (int fd, struct stat const *st) { bufbeg = buflim = ((uintptr_t) (buffer + 1) % (pagesize) == 0 ? (buffer + 1) : (buffer + 1) + ((pagesize) - (uintptr_t) (buffer + 1) % (pagesize))); bufbeg[-1] = eolbyte; bufdesc = fd; bufoffset = fd == 0 ? lseek (fd, 0, 1 ) : 0; seek_failed = bufoffset < 0; seek_data_failed = seek_failed; if (seek_failed) { if ( (*__errno_location ()) != 29 ) { suppressible_error ( (*__errno_location ()) ); return 0 ; } bufoffset = 0; } return 1 ; }
int reset(unsigned long a0, unsigned long a1) { unsigned long v0; unsigned long v3; v0 = a1; *(&buflim) = (!(0 CONCAT buffer + 1) /m pagesize >> 64 ? pagesize - ((0 CONCAT buffer + 1) /m pagesize >> 64) + 1 + buffer : buffer + 1); bufbeg = buflim; *((bufbeg - 1)) = eolbyte; bufdesc = a0; if (a0) v3 = 0; else v3 = lseek(a0, 0x0, 0x1); bufoffset = v3; seek_failed = bufoffset >> 63; seek_data_failed = seek_failed; if (!seek_failed) { *(&v3) = 1; return v3; } *(&v3) = *(__errno_location()); if (v3 == 29) { bufoffset = 0; *(&v3) = 1; return v3; } suppressible_error(*(__errno_location())); *(&v3) = 0; return v3; }
void request_stdin (const char *rpl_option) { if (stdin_used_by) do { if (error_hook) error_hook (); error (0, 0, gettext ("Options '%s' and '%s' both want standard input"), stdin_used_by, rpl_option); usage (2); } while (0) ; stdin_used_by = rpl_option; }
long request_stdin(long a1) { long v1; char *v2; long result; if ( stdin_used_by ) { if ( error_hook ) error_hook(a1); v1 = stdin_used_by; v2 = gettext("Options '%s' and '%s' both want standard input"); error(0, 0, v2, v1, a1); usage(2); } result = a1; stdin_used_by = a1; return result; }
static inline struct ext2_inode *EXT2_INODE(struct ext2_inode_large *large_inode) { return (struct ext2_inode *) large_inode; }
int EXT2_INODE(unsigned long a0) { return a0; }
static inline long double absld (long double val) { return val < 0 ? -val : val; }
void absld() { [D] t3 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t7) if ([D] GetI(968:I8x8)[t4,0]) { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) [D] PutI(904:F64x8)[t4,0] = t7 [D] PutI(968:I8x8)[t4,0] = 0x01 } else { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) [D] PutI(904:F64x8)[t4,0] = t7 [D] PutI(968:I8x8)[t4,0] = 0x01 } [D] PutI(904:F64x8)[t0,0] = t3 [D] PutI(968:I8x8)[t0,0] = 0x01 [D] PutI(968:I8x8)[t16,0] = 0x00 [D] PutI(904:F64x8)[t30,0] = t31 [D] PutI(968:I8x8)[t30,0] = 0x01 [D] PutI(968:I8x8)[t30,0] = 0x00 if ((((BinaryOp CmpF & 69) | ((BinaryOp CmpF & 69) >> 6)) & 1) != 1) { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) if ([D] GetI(968:I8x8)[t4,0]) { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) [D] PutI(904:F64x8)[t4,0] = t7 [D] PutI(968:I8x8)[t4,0] = 0x01 } else { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) [D] PutI(904:F64x8)[t4,0] = t7 [D] PutI(968:I8x8)[t4,0] = 0x01 } [D] PutI(904:F64x8)[t0,0] = t1 [D] PutI(968:I8x8)[t0,0] = 0x01 return; } else { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) if ([D] GetI(968:I8x8)[t4,0]) { [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) [D] PutI(904:F64x8)[t4,0] = t7 [D] PutI(968:I8x8)[t4,0] = 0x01 return; } [D] t1 = DIRTY 1 TODO(effects) ::: amd64g_dirtyhelper_loadF80le(t2) [D] PutI(904:F64x8)[t4,0] = t7 [D] PutI(968:I8x8)[t4,0] = 0x01 return; } }
const char * channel_format_extended_usage(const Channel *c) { if (c->efd == -1) return "closed"; switch (c->extended_usage) { case 2: return "write"; case 1: return "read"; case 0: return "ignore"; default: return "UNKNOWN"; } }
const char * channel_format_extended_usage(long a1) { int v2; if ( *(_DWORD *)(a1 + 36) == -1 ) return "closed"; v2 = *(_DWORD *)(a1 + 192); if ( v2 == 2 ) return "write"; if ( v2 <= 2 ) { if ( !v2 ) return "ignore"; if ( v2 == 1 ) return "read"; } return "UNKNOWN"; }
SHELL_VAR * make_local_assoc_variable (name, flags) char *name; int flags; { SHELL_VAR *var; HASH_TABLE *hash; int array_ok; array_ok = flags & 0x02; var = make_local_variable (name, flags & 0x04); if (var == 0 || ((((var)->attributes) & (0x0000040))) || (array_ok && ((((var)->attributes) & (0x0000004))))) return var; if (localvar_inherit && ((((var)->attributes) & (0x0000004)))) { internal_warning (gettext("%s: cannot inherit value from incompatible type"), name); ((var)->attributes &= ~(0x0000004)); dispose_variable_value (var); hash = (hash_create((1024))); ((var)->value = (char *)(hash)); } else if (localvar_inherit) var = convert_var_to_assoc (var); else { dispose_variable_value (var); hash = (hash_create((1024))); ((var)->value = (char *)(hash)); } ((var)->attributes |= (0x0000040)); return var; }
long * make_local_assoc_variable(const char *a1, char a2) { char *v3; long *local_variable; local_variable = make_local_variable(a1, a2 & 4); if ( !local_variable || (local_variable[5] & 0x40) != 0 || (a2 & 2) != 0 && (local_variable[5] & 4) != 0 ) return local_variable; if ( localvar_inherit && (local_variable[5] & 4) != 0 ) { v3 = gettext("%s: cannot inherit value from incompatible type"); internal_warning(v3, a1); *((_DWORD *)local_variable + 10) &= ~4u; dispose_variable_value((long)local_variable); local_variable[1] = hash_create(1024LL); } else if ( localvar_inherit ) { local_variable = (long *)convert_var_to_assoc(local_variable); } else { dispose_variable_value((long)local_variable); local_variable[1] = hash_create(1024LL); } *((_DWORD *)local_variable + 10) |= 0x40u; return local_variable; }
int rl_call_last_kbd_macro (int count, int ignore) { if (current_macro == 0) _rl_abort_internal (); if ((rl_readline_state & (0x0001000))) { rl_ding (); current_macro[--current_macro_index] = '\0'; return 0; } while (count--) _rl_with_macro_input (strcpy ((char *)xmalloc (1 + strlen (current_macro)), (current_macro))); return 0; }
long rl_call_last_kbd_macro(int a1) { const char *v2; size_t v3; char *v4; char *v5; if ( !current_macro ) rl_abort_internal(); if ( (rl_readline_state & 0x1000) != 0 ) { rl_ding(); current_macro[--current_macro_index] = 0; return 0LL; } else { while ( a1-- ) { v2 = current_macro; v3 = strlen(current_macro); v4 = (char *)xmalloc(v3 + 1); v5 = strcpy(v4, v2); rl_with_macro_input(v5); } return 0LL; } }
static struct change * build_script (struct file_data const filevec[]) { struct change *script = 0; char *changed0 = filevec[0].changed; char *changed1 = filevec[1].changed; lin i0 = filevec[0].buffered_lines, i1 = filevec[1].buffered_lines; while (i0 >= 0 || i1 >= 0) { if (changed0[i0 - 1] | changed1[i1 - 1]) { lin line0 = i0, line1 = i1; while (changed0[i0 - 1]) --i0; while (changed1[i1 - 1]) --i1; script = add_change (i0, i1, line0 - i0, line1 - i1, script); } i0--, i1--; } return script; }
_QWORD * build_script(_QWORD *a1) { _QWORD *v2; long v3; long i; long v5; long v6; long v7; long v8; v2 = 0LL; v5 = a1[35]; v6 = a1[73]; v3 = a1[25]; for ( i = a1[63]; v3 >= 0 || i >= 0; --i ) { if ( *(_BYTE *)(v3 - 1 + v5) | *(_BYTE *)(i - 1 + v6) ) { v7 = v3; v8 = i; while ( *(_BYTE *)(v3 - 1 + v5) ) --v3; while ( *(_BYTE *)(i - 1 + v6) ) --i; v2 = add_change(v3, i, v7 - v3, v8 - i, (long)v2); } --v3; } return v2; }
void uid_to_uname (uid_t uid, char **uname) { struct passwd *passwd; if (uid != 0 && uid == cached_no_such_uid) { *uname = xstrdup (""); return; } if (!cached_uname || uid != cached_uid) { passwd = getpwuid (uid); if (passwd) { cached_uid = uid; assign_string (&cached_uname, passwd->pw_name); } else { cached_no_such_uid = uid; *uname = xstrdup (""); return; } } *uname = xstrdup (cached_uname); }
long * uid_to_uname(__uid_t a1, long *a2) { long v2; long *result; long v4; long v5; struct passwd *v6; if ( a1 && a1 == cached_no_such_uid ) { v2 = xstrdup(&unk_4344); result = a2; *a2 = v2; return result; } if ( !cached_uname || a1 != cached_uid ) { v6 = getpwuid(a1); if ( !v6 ) { cached_no_such_uid = a1; v4 = xstrdup(&unk_4344); result = a2; *a2 = v4; return result; } cached_uid = a1; assign_string(&cached_uname, v6->pw_name); } v5 = xstrdup(cached_uname); result = a2; *a2 = v5; return result; }
void setup_history_ignore (varname) char *varname; { setup_ignore_patterns (&histignore); }
void setup_history_ignore(void) { setup_ignore_patterns(histignore); return; }
void * xreallocarray(void *ptr, size_t nmemb, size_t size) { void *new_ptr; new_ptr = reallocarray(ptr, nmemb, size); if (new_ptr == ((void *)0) ) sshfatal("xmalloc.c", __func__, 69, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "xreallocarray: out of memory (%zu elements of %zu bytes)", nmemb, size) ; return new_ptr; }
long long xreallocarray(void* a0, unsigned int a1, unsigned int a2) { unsigned long long v0; unsigned long v1; unsigned long v2; unsigned long v3; v3 = reallocarray(a0, a1, a2); if (!v3) { *(&v2) = a2; *(&v1) = a1; v0 = "xreallocarray: out of memory (%zu elements of %zu bytes)"; sshfatal("xmalloc.c", "xreallocarray", 0x45, 0x0, 0x1, 0x0); return v3; } return v3; }
static int release_inode_block(ext2_filsys fs, blk64_t *block_nr, e2_blkcnt_t blockcnt, blk64_t ref_blk __attribute__((unused)), int ref_offset __attribute__((unused)), void *priv_data) { struct process_block_struct *pb; e2fsck_t ctx; struct problem_context *pctx; blk64_t blk = *block_nr; blk64_t cluster = ((*block_nr) >> (fs)->cluster_ratio_bits); int retval = 0; pb = (struct process_block_struct *) priv_data; ctx = pb->ctx; pctx = pb->pctx; pctx->blk = blk; pctx->blkcount = blockcnt; if (blk == 0) return 0; if (pb->last_cluster == cluster) return 0; pb->last_cluster = cluster; if ((blk < fs->super->s_first_data_block) || (blk >= ext2fs_blocks_count(fs->super))) { fix_problem(ctx, 0x000021, pctx); return_abort: pb->abort = 1; return 2; } if (!ext2fs_test_block_bitmap2(fs->block_map, blk)) { fix_problem(ctx, 0x000022, pctx); goto return_abort; } if (pb->truncating) { if (blockcnt < 0) { int i, limit; blk_t *bp; pb->errcode = io_channel_read_blk64(fs->io, blk, 1, pb->buf); if (pb->errcode) goto return_abort; limit = fs->blocksize >> 2; for (i = 0, bp = (blk_t *) pb->buf; i < limit; i++, bp++) if (*bp) return 0; } if (blockcnt >= 0 && blockcnt < pb->truncate_block) return 0; if ((blockcnt == pb->truncate_block) && pb->truncate_offset) { pb->errcode = io_channel_read_blk64(fs->io, blk, 1, pb->buf); if (pb->errcode) goto return_abort; memset(pb->buf + pb->truncate_offset, 0, fs->blocksize - pb->truncate_offset); pb->errcode = io_channel_write_blk64(fs->io, blk, 1, pb->buf); if (pb->errcode) goto return_abort; } pb->truncated_blocks++; *block_nr = 0; retval |= 1; } if (ctx->qctx) quota_data_sub(ctx->qctx, pb->inode, 0, ctx->fs->blocksize); ext2fs_block_alloc_stats2(fs, blk, -1); ctx->free_blocks++; return retval; }
long long release_inode_block(struct_1 *a0, unsigned long long *a1, unsigned long a2, unsigned long a3, unsigned long a4, struct_0 *a5) { unsigned int v0; unsigned long v1; unsigned int v2; unsigned int v3; unsigned int v4; unsigned int *v5; unsigned long long v6; unsigned long v7; struct_3 *v8; unsigned long long v9[8]; unsigned long long v11; v1 = a3; v0 = a4; v6 = *(a1); v7 = *(a1) >> (a0->field_c0 & 63); v2 = 0; v8 = a5->field_0; v9[0] = a5->field_10; v9[5] = v6; v9[7] = a2; if (!v6) { v11 = 0; return v11; } else if (v7 != a5->field_38) { a5->field_38 = v7; if (v6 >= a0->field_20->field_14 && v6 < ext2fs_blocks_count(a0->field_20)) { if (ext2fs_test_block_bitmap2(a0->field_58, v6, v6)) { if (a5->field_18) { if ((a2 - 0 >> 63)) a5->field_30 = io_channel_read_blk64(a0->field_8, v6, 0x1, a5->field_8); while (true) { if (!((a2 - 0 >> 63)) && a2 < a5->field_20) { v11 = 0; return v11; } if (!(a2 == a5->field_20) || !(a5->field_1c)) { LABEL_40077f: a5->field_28 = a5->field_28 + 1; *(a1) = 0; v2 |= 1; break; } else { a5->field_30 = io_channel_read_blk64(a0->field_8, v6, 0x1, a5->field_8); if ((a2 - 0 >> 63)) { if (a5->field_30) { a5->field_2c = 1; v11 = 2; return v11; } v4 = a0->field_28 >> 2; v3 = 0; for (v5 = a5->field_8; v3 < v4; v5 += 1) { if (!*(v5)) { v3 += 1; } else { v11 = 0; return v11; } } } else { if (a5->field_30) { a5->field_2c = 1; v11 = 2; return v11; } memset(a5->field_1c + a5->field_8, 0x0, a0->field_28 - a5->field_1c); a5->field_30 = io_channel_write_blk64(a0->field_8, v6, 0x1, a5->field_8); if (a5->field_30) { a5->field_2c = 1; v11 = 2; return v11; } goto LABEL_40077f; } } } } if (v8->field_278) quota_data_sub(v8->field_278, a5->field_40, 0x0, v8->field_0->field_28); ext2fs_block_alloc_stats2(a0, v6, 0xffffffff, v6); v8->field_70 = v8->field_70 + 1; v11 = v2; return v11; } else { fix_problem(v8, 0x22, v9); a5->field_2c = 1; v11 = 2; return v11; } } fix_problem(v8, 0x21, v9); a5->field_2c = 1; v11 = 2; return v11; } else { v11 = 0; return v11; } }
static void error_prolog (print_lineno) int print_lineno; { char *ename; int line; ename = get_name_for_error (); line = (print_lineno && interactive_shell == 0) ? executing_line_number () : -1; if (line > 0) fprintf ( stderr , "%s:%s%d: ", ename, gnu_error_format ? "" : gettext(" line "), line); else fprintf ( stderr , "%s: ", ename); }
void error_prolog(unsigned long a0) { unsigned int v0; unsigned long v1; unsigned int v3; unsigned long long v4; unsigned long long v5; v1 = get_name_for_error(); if (a0 && !interactive_shell) v3 = executing_line_number(); if (!a0 || interactive_shell) v3 = -1; v0 = v3; if (v0 > 0) { if (!gnu_error_format) v3 = gettext(" line "); else v3 = &g_400df8; v5 = fprintf(*(&stderr), "%s:%s%d: ", v1, v3, v0); } else { v4 = fprintf(*(&stderr), "%s: ", v1); } return; }
void strlist_sort (sl) STRINGLIST *sl; { if (sl == 0 || sl->list_len == 0 || sl->list == 0) return; strvec_sort (sl->list, 0); }
long strlist_sort(long *a1) { long result; if ( a1 ) { result = *((unsigned int *)a1 + 3); if ( (_DWORD)result ) { result = *a1; if ( *a1 ) return strvec_sort(*a1, 0LL); } } return result; }
static int kmod_help(int argc, char *argv[]) { size_t i; printf("kmod - Manage kernel modules: list, load, unload, etc\n" "Usage:\n" "\t%s [options] command [command_options]\n\n" "Options:\n" "\t-V, --version show version\n" "\t-h, --help show this help\n\n" "Commands:\n", basename(argv[0])); for (i = 0; i < (sizeof(kmod_cmds) / sizeof((kmod_cmds)[0]) + ({ _Static_assert((!__builtin_types_compatible_p(typeof(kmod_cmds), typeof(&(kmod_cmds)[0]))), "!__builtin_types_compatible_p(typeof(kmod_cmds), typeof(&(kmod_cmds)[0]))"); 0; })); i++) { if (kmod_cmds[i]->help != ((void *)0) ) { printf(" %-12s %s\n", kmod_cmds[i]->name, kmod_cmds[i]->help); } } puts("\nkmod also handles gracefully if called from following symlinks:"); for (i = 0; i < (sizeof(kmod_compat_cmds) / sizeof((kmod_compat_cmds)[0]) + ({ _Static_assert((!__builtin_types_compatible_p(typeof(kmod_compat_cmds), typeof(&(kmod_compat_cmds)[0]))), "!__builtin_types_compatible_p(typeof(kmod_compat_cmds), typeof(&(kmod_compat_cmds)[0]))"); 0; })); i++) { if (kmod_compat_cmds[i]->help != ((void *)0) ) { printf(" %-12s %s\n", kmod_compat_cmds[i]->name, kmod_compat_cmds[i]->help); } } return 0 ; }
void kmod_help(unsigned long a0, unsigned long long *a1) { unsigned int v0; void* v1; void* v3; v0 = a0; printf("kmod - Manage kernel modules: list, load, unload, etc\nUsage:\n\t%s [options] command [command_options]\n\nOptions:\n\t-V, --version show version\n\t-h, --help show this help\n\nCommands:\n", basename(*(a1))); for (v1 = 0; v1 <= 2; v1 += 1) { if (*((*((0x8 * v1 + &kmod_cmds[0])) + 16))) printf(" %-12s %s\n", *(*((0x8 * v1 + &kmod_cmds[0])))); } puts("\nkmod also handles gracefully if called from following symlinks:"); for (v1 = 0; v1 <= 5; v1 += 1) { if (*((*((0x8 * v1 + &kmod_compat_cmds[0])) + 16))) printf(" %-12s %s\n", *(*((0x8 * v1 + &kmod_compat_cmds[0])))); } v3 = 0; return; }
static int collequiv_wc (c, equiv) wint_t c, equiv; { wchar_t s, p; if (charcmp_wc (c, equiv, 1) == 0) return 1; return 0; }
_BOOL8 collequiv_wc(unsigned int a1, unsigned int a2) { return charcmp_wc(a1, a2, 1) == 0; }
static void set_integer(const struct cmdinfo *cip, const char *value) { *cip->iassignto = dpkg_options_parse_arg_int(cip, value); }
long long set_integer(struct_0 *a0, unsigned long long a1) { unsigned int *v1; v1 = a0->field_10; a0->field_10->field_0 = dpkg_options_parse_arg_int(a0, a1, a1); return v1; }
static void rsyslogdDebugSwitch(void) { time_t tTime; struct tm tp; datetime.GetTime(&tTime); localtime_r(&tTime, &tp); if(debugging_on == 0) { debugging_on = 1; r_dbgprintf("rsyslogd.c", "\n"); r_dbgprintf("rsyslogd.c", "\n"); r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); r_dbgprintf("rsyslogd.c", "Switching debugging_on to true at %2.2d:%2.2d:%2.2d\n", tp.tm_hour, tp.tm_min, tp.tm_sec) ; r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); } else { r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); r_dbgprintf("rsyslogd.c", "Switching debugging_on to false at %2.2d:%2.2d:%2.2d\n", tp.tm_hour, tp.tm_min, tp.tm_sec) ; r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); r_dbgprintf("rsyslogd.c", "\n"); r_dbgprintf("rsyslogd.c", "\n"); debugging_on = 0; } }
unsigned long rsyslogdDebugSwitch() { time_t timer; struct tm tp; unsigned long v3; v3 = __readfsqword(0x28u); qword_4648(&timer); localtime_r(&timer, &tp); if ( debugging_on ) { r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); r_dbgprintf( "rsyslogd.c", "Switching debugging_on to false at %2.2d:%2.2d:%2.2d\n", (unsigned int)tp.tm_hour, (unsigned int)tp.tm_min, (unsigned int)tp.tm_sec); r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); r_dbgprintf("rsyslogd.c", "\n"); r_dbgprintf("rsyslogd.c", "\n"); debugging_on = 0; } else { debugging_on = 1; r_dbgprintf("rsyslogd.c", "\n"); r_dbgprintf("rsyslogd.c", "\n"); r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); r_dbgprintf( "rsyslogd.c", "Switching debugging_on to true at %2.2d:%2.2d:%2.2d\n", (unsigned int)tp.tm_hour, (unsigned int)tp.tm_min, (unsigned int)tp.tm_sec); r_dbgprintf("rsyslogd.c", "********************************************************************************\n"); } return __readfsqword(0x28u) ^ v3; }
test_code_t test_aes_ccm_8(gnutls_session_t session) { int ret; sprintf(prio_str, "NONE:" "+AES-128-CCM-8:+AES-256-CCM-8:" "+COMP-NULL" ":%s:" "+MAC-ALL:+MD5:+SHA1" ":+GOST28147-TC26Z-IMIT" ":" "+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH" ":+VKO-GOST-12" ":%s", protocol_all_str, rest); { int _ret; if ((_ret=__gnutls_priority_set_direct(session, prio_str, 798)) != TEST_SUCCEED) { return _ret; } }; gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); ret = test_do_handshake(session); return ret; }
long long test_aes_ccm_8(unsigned long long a0) { unsigned int v0; unsigned int v1; unsigned long long v3; sprintf(&prio_str, "NONE:+AES-128-CCM-8:+AES-256-CCM-8:+COMP-NULL:%s:+MAC-ALL:+MD5:+SHA1:+GOST28147-TC26Z-IMIT:+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH:+VKO-GOST-12:%s", &protocol_all_str, &rest); v0 = __gnutls_priority_set_direct(a0, &prio_str, 0x31e); if (v0) { v3 = v0; } else { gnutls_credentials_set(a0, 0x1, xcred); v1 = test_do_handshake(a0); v3 = v1; } return v3; }
static int sshsig_peek_hashalg(struct sshbuf *signature, char **hashalgp) { struct sshbuf *buf = ((void *)0) ; char *hashalg = ((void *)0) ; int r = -1; if (hashalgp != ((void *)0) ) *hashalgp = ((void *)0) ; if ((buf = sshbuf_fromb(signature)) == ((void *)0) ) return -2; if ((r = sshsig_parse_preamble(buf)) != 0) goto done; if ((r = sshbuf_get_string_direct(buf, ((void *)0) , ((void *)0) )) != 0 || (r = sshbuf_get_string_direct(buf, ((void *)0) , ((void *)0) )) != 0 || (r = sshbuf_get_string(buf, ((void *)0) , ((void *)0) )) != 0 || (r = sshbuf_get_cstring(buf, &hashalg, ((void *)0) )) != 0 || (r = sshbuf_get_string_direct(buf, ((void *)0) , ((void *)0) )) != 0) { sshlog("sshsig.c", __func__, 274, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "parse signature object"); goto done; } r = 0; *hashalgp = hashalg; hashalg = ((void *)0) ; done: free(hashalg); sshbuf_free(buf); return r; }
long sshsig_peek_hashalg(long a1, void **a2) { long v3; unsigned int string_direct; void *ptr; long v6; unsigned long v7; v7 = __readfsqword(0x28u); v6 = 0LL; ptr = 0LL; if ( a2 ) *a2 = 0LL; v6 = sshbuf_fromb(a1); if ( !v6 ) return 4294967294LL; string_direct = sshsig_parse_preamble(v6); if ( !string_direct ) { string_direct = sshbuf_get_string_direct(v6, 0LL, 0LL); if ( string_direct || (string_direct = sshbuf_get_string_direct(v6, 0LL, 0LL)) != 0 || (string_direct = sshbuf_get_string(v6, 0LL, 0LL)) != 0 || (string_direct = sshbuf_get_cstring(v6, &ptr, 0LL)) != 0 || (string_direct = sshbuf_get_string_direct(v6, 0LL, 0LL)) != 0 ) { v3 = ssh_err(string_direct); sshlog("sshsig.c", "sshsig_peek_hashalg", 274LL, 1LL, 2LL, v3, "parse signature object"); } else { string_direct = 0; *a2 = ptr; ptr = 0LL; } } free(ptr); sshbuf_free(v6); return string_direct; }
static int needs_escaping(wchar_t c) { switch (c) { case '\'': case '"': case '(': case ')': case '\\': case '<': case '>': case '$': case '#': case ' ': case '\n': case '\t': case '?': case ';': case '`': case '@': case '=': case '|': case '{': case '}': case '&': case '*': case '[': return 1; default: return 0; } }
undefined8 needs_escaping(int param_1) { if (param_1 < 0xb) { if (8 < param_1) { LAB_001002fc: return 1; } } else if ((param_1 < 0x7e) && (0x1f < param_1)) { switch(param_1) { case 0x20: case 0x22: case 0x23: case 0x24: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: case 0x40: case 0x5b: case 0x5c: case 0x60: case 0x7b: case 0x7c: case 0x7d: goto LAB_001002fc; } } return 0; }
char * extract_colon_unit (string, p_index) char *string; int *p_index; { int i, start, len; char *value; if (string == 0) return (string); len = strlen (string); if (*p_index >= len) return ((char *) ((void *)0) ); i = *p_index; if (i && string[i] == ':') i++; for (start = i; string[i] && string[i] != ':'; i++) ; *p_index = i; if (i == start) { if (string[i]) (*p_index)++; value = (char *)sh_xmalloc((1), "general.c", 1046); value[0] = '\0'; } else value = substring (string, start, i); return (value); }
long long extract_colon_unit(void* a0, unsigned int *a1) { unsigned int *v0; unsigned int v1; unsigned int v2; unsigned int v3; void* v4; void* v6; v0 = a1; if (!a0) { v6 = a0; } else { v2 = strlen(a0); if (v2 <= *(a1)) { v6 = 0; } else { v1 = *(a1); if (v1 && *(a0 + v1) == 58) v1 += 1; v3 = v1; while (true) { if (!*(a0 + v1)) break; if (*(a0 + v1) == 58) break; v1 += 1; } *(a1) = v1; if (v1 != v3) { v4 = substring(a0, v3, v1, v3); } else { if (*(a0 + v1)) *(a1) = *(a1) + 1; v4 = sh_xmalloc(0x1, "general.c", 0x416); *(v4) = 0; } v6 = v4; } } return v6; }
do { v = bind_variable ("BASH_COMMAND", ((char *) ((void *)0) ), 0); v->dynamic_value = get_bash_command; v->assign_func = (sh_var_assign_func_t *) ((void *)0) ; } while (0);
void bind_variable(undefined8 param_1,long param_2,undefined4 param_3) { undefined8 uVar1; undefined8 *puVar2; int iVar3; undefined8 uVar4; long in_FS_OFFSET; long local_40; undefined8 *local_38; long local_30; undefined8 *local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if (shell_variables == 0) { create_variable_tables(); } if ((temporary_env != 0) && (param_2 != 0)) { bind_tempenv_variable(param_1,param_2); } local_30 = shell_variables; do { if (local_30 == 0) { bind_variable_internal(param_1,param_2,*(undefined8 *)(global_variables + 0x20),0,param_3); LAB_00105c61: if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) { return; } __stack_chk_fail(); } if (((*(uint *)(local_30 + 0xc) & 4) != 0) || ((*(uint *)(local_30 + 0xc) & 8) != 0)) { local_38 = (undefined8 *)hash_lookup(param_1,*(undefined8 *)(local_30 + 0x20)); local_40 = local_30; puVar2 = local_38; if ((local_38 != (undefined8 *)0x0) && ((*(uint *)(local_38 + 5) & 0x800) != 0)) { local_28 = (undefined8 *)find_variable_nameref_context(local_38,local_30,&local_40); if (local_28 == (undefined8 *)0x0) { local_28 = (undefined8 *)find_variable_last_nameref_context(local_38,local_30,&local_40); if ((local_28 != (undefined8 *)0x0) && ((*(uint *)(local_28 + 5) & 0x800) != 0)) { if (local_28[1] == 0) { bind_variable_internal(*local_28,param_2,*(undefined8 *)(local_40 + 0x20),0,param_3); } else { iVar3 = valid_array_reference(local_28[1],0); if (iVar3 == 0) { bind_variable_internal (local_28[1],param_2,*(undefined8 *)(local_40 + 0x20),0,param_3); } else { assign_array_element(local_28[1],param_2,param_3,0); } } goto LAB_00105c61; } puVar2 = local_28; if (local_28 == (undefined8 *)nameref_maxloop_value) { uVar1 = *local_38; uVar4 = gettext("%s: circular name reference"); internal_warning(uVar4,uVar1); bind_global_variable(*local_38,param_2,param_3); goto LAB_00105c61; } } else { puVar2 = local_28; if (local_28 == (undefined8 *)nameref_maxloop_value) { uVar1 = *local_38; uVar4 = gettext("%s: circular name reference"); internal_warning(uVar4,uVar1); bind_global_variable(*local_38,param_2,param_3); goto LAB_00105c61; } } } local_38 = puVar2; if (local_38 != (undefined8 *)0x0) { bind_variable_internal(*local_38,param_2,*(undefined8 *)(local_40 + 0x20),0,param_3); goto LAB_00105c61; } } local_30 = *(long *)(local_30 + 0x18); } while( true ); }