input
stringlengths
16
454k
output
stringlengths
13
350k
function_name
stringlengths
1
100
repo_name
stringlengths
6
43
category
stringclasses
76 values
sample_id
stringlengths
22
88
decompiler
stringclasses
1 value
opt_level
stringclasses
1 value
int getColorConfig() { int rc; char *color; rc = 0; color = rpmExpand("%{?_color_output}%{!?_color_output:auto}", 0); if (rstreq_2(color, "auto")) { rc = 1; } else if (rstreq_2(color, "always")) { rc = 2; } free(color); return rc; }
static int getColorConfig(void) { int rc = COLOR_NO; char *color = rpmExpand("%{?_color_output}%{!?_color_output:auto}", NULL); if (rstreq(color, "auto")) rc = COLOR_AUTO; else if (rstreq(color, "always")) rc = COLOR_ALWAYS; free(color); return rc; }
getColorConfig
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int getKeyID(const uint8_t *h, size_t hlen, uint8_t *keyid) { int rc; uint8_t *fp; size_t fplen[2]; fplen[1] = __readfsqword(0x28u); fp = 0; fplen[0] = 0; rc = pgpPubkeyFingerprint(h, hlen, &fp, fplen); if (fp && fplen[0] > 8) { *(_QWORD *)keyid = *(_QWORD *)&fp[fplen[0] - 8]; free(fp); } r...
static int getKeyID(const uint8_t *h, size_t hlen, pgpKeyID_t keyid) { uint8_t *fp = NULL; size_t fplen = 0; int rc = pgpPubkeyFingerprint(h, hlen, &fp, &fplen); if (fp && fplen > 8) { memcpy(keyid, (fp + (fplen - 8)), 8); free(fp); } return rc; }
getKeyID
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
char *getValuebuf(ParseState state, const char *p, size_t size) { char *temp2; char *temp; unsigned long v7; v7 = __readfsqword(0x28u); if (state->flags < 0) size = 0; temp = (char *)rmalloc(size + 1); memcpy(temp, p, size); temp[size] = 0; if (size && (state->flags & 1) != 0) { temp2 = 0; ...
static char *getValuebuf(ParseState state, const char *p, size_t size) { char *temp; if ((state->flags & RPMEXPR_DISCARD) != 0) size = 0; temp = xmalloc(size + 1); memcpy(temp, p, size); temp[size] = '\0'; if (size && (state->flags & RPMEXPR_EXPAND) != 0) { char *temp2 = NULL; rpmExpandMacros(NU...
getValuebuf
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int get_compression_threads(int threads) { int threadsa; threadsa = threads; if (threads == -1) return rpmExpandNumeric("%{getncpus}"); return threadsa; }
static int get_compression_threads(int threads) { if (threads == -1) threads = rpmExpandNumeric("%{getncpus}"); #if __WORDSIZE == 32 if (threads > 4) { threads = 4; rpmlog(RPMLOG_DEBUG, "threading compression limited to 4 threads on 32-bit systems\n"); } #endif return threads; }
get_compression_threads
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void *getdata(lua_State *L, const char *key) { void *ret; ret = 0; lua_pushstring(L, "rpm_"); lua_pushstring(L, key); lua_concat(L, 2); lua_rawget(L, 4293966296LL); if ((unsigned int)lua_type(L, 0xFFFFFFFFLL) == 2) ret = (void *)lua_touserdata(L, 0xFFFFFFFFLL); lua_settop(L, 4294967294LL); return...
static void *getdata(lua_State *L, const char *key) { void *ret = NULL; lua_pushliteral(L, "rpm_"); lua_pushstring(L, key); lua_concat(L, 2); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_islightuserdata(L, -1)) ret = lua_touserdata(L, -1); lua_pop(L, 1); return ret; }
getdata
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
unsigned int getncpus() { unsigned int ncpus; cpu_set_t set; unsigned long v3; v3 = __readfsqword(0x28u); ncpus = 0; if (!sched_getaffinity(0, 0x80u, &set)) ncpus = __sched_cpucount(0x80u, &set); if (!ncpus) ncpus = sysconf(84); if (!ncpus) return 1; return ncpus; }
static unsigned int getncpus(void) { unsigned int ncpus = 0; #if HAVE_SCHED_GETAFFINITY cpu_set_t set; if (sched_getaffinity(0, sizeof(set), &set) == 0) ncpus = CPU_COUNT(&set); #endif if (ncpus < 1) ncpus = sysconf(_SC_NPROCESSORS_ONLN); if (ncpus < 1) ncpus = 1; return ncpus; }
getncpus
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) { size_t v5; void *v6; int v7; void *v8; void *v9; void *v10; const char *v11; void *v12; void *v13; size_t v14; void *v15; void *v16; size_t gl_offs; char **v18; char **gl_pathv; size_t v...
static int glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) { const char *filename; const char *dirname; size_t dirlen; int status; int oldcount; if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) { __set_errno(EINVAL); return...
glob
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int glob_in_dir(const char *pattern, const char *directory, int flags, int (*errfunc)(const char *, int), glob_t *pglob) { void *v5; size_t v6; void *v7; void *v8; bool v9; void *v10; void *v11; int *v12; int v14; dirent *v15; void *v16; char *v17; void *v18; char *v19; siz...
static int glob_in_dir(const char *pattern, const char *directory, int flags, int (*errfunc)(const char *, int), glob_t *pglob) { void *stream = NULL; struct globlink { struct globlink *next; char *name; }; struct globlink *names = NULL; size_t nfound; int meta; int save; ...
glob_in_dir
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void globfree(glob_t *pglob) { int i; if (pglob->gl_pathv) { for (i = 0; i < pglob->gl_pathc; ++i) { if (pglob->gl_pathv[i]) free(pglob->gl_pathv[i]); } free(pglob->gl_pathv); } }
static void globfree(glob_t *pglob) { if (pglob->gl_pathv != NULL) { register int i; for (i = 0; i < pglob->gl_pathc; ++i) if (pglob->gl_pathv[i] != NULL) free(pglob->gl_pathv[i]); free(pglob->gl_pathv); } }
globfree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *grabArgs(MacroBuf mb, ARGV_t *argvp, const char *se, const char *lastc) { char *s[2]; s[1] = (char *)__readfsqword(0x28u); s[0] = 0; expandThis(mb, se, lastc - se, s); splitQuoted(argvp, s[0], " \t"); free(s[0]); if (*lastc && (*lastc != 10 || *(lastc - 1) == 92)) ret...
static const char *grabArgs(MacroBuf mb, ARGV_t *argvp, const char *se, const char *lastc) { char *s = NULL; expandThis(mb, se, lastc - se, &s); splitQuoted(argvp, s, " \t"); free(s); return (*lastc == '\0') || (*lastc == '\n' && *(lastc - 1) != '\\') ? lastc ...
grabArgs
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int gzdClose(FDSTACK_t fps) { gzFile gzfile; gzfile = (gzFile)fps->fp; if (!gzfile) return -2; if ((unsigned int)gzclose(gzfile)) return -1; return 0; }
static int gzdClose(FDSTACK_t fps) { gzFile gzfile = fps->fp; int rc; if (gzfile == NULL) return -2; rc = gzclose(gzfile); return (rc != 0) ? -1 : 0; }
gzdClose
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
FD_t gzdFdopen(FD_t fd, int fdno, const char *fmode) { gzFile gzfile; gzfile = (gzFile)gzdopen((unsigned int)fdno, fmode); if (!gzfile) return 0; fdSetFdno(fd, -1); fdPush(fd, &gzdio_s, gzfile, fdno); return fd; }
static FD_t gzdFdopen(FD_t fd, int fdno, const char *fmode) { gzFile gzfile = gzdopen(fdno, fmode); if (gzfile == NULL) return NULL; fdSetFdno(fd, -1); fdPush(fd, gzdio, gzfile, fdno); return fd; }
gzdFdopen
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int gzdFlush(FDSTACK_t fps) { gzFile gzfile; gzfile = (gzFile)fps->fp; if (gzfile) return gzflush(gzfile, 2); else return -2; }
static int gzdFlush(FDSTACK_t fps) { gzFile gzfile = fps->fp; if (gzfile == NULL) return -2; return gzflush(gzfile, Z_SYNC_FLUSH); }
gzdFlush
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
ssize_t gzdRead(FDSTACK_t fps, void *buf, size_t count) { gzFile gzfile; long rc; gzfile = (gzFile)fps->fp; if (!gzfile) return -2; rc = (int)gzread(gzfile, buf, (unsigned int)count); if (rc < 0) gzdSetError(fps); return rc; }
static ssize_t gzdRead(FDSTACK_t fps, void *buf, size_t count) { gzFile gzfile = fps->fp; ssize_t rc; if (gzfile == NULL) return -2; rc = gzread(gzfile, buf, count); if (rc < 0) gzdSetError(fps); return rc; }
gzdRead
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int gzdSeek(FDSTACK_t fps, off_t pos, int whence) { int rc; gzFile gzfile; gzfile = (gzFile)fps->fp; if (!gzfile) return -2; rc = gzseek(gzfile, pos, (unsigned int)whence); if (rc < 0) gzdSetError(fps); return rc; }
static int gzdSeek(FDSTACK_t fps, off_t pos, int whence) { off_t p = pos; int rc; #if HAVE_GZSEEK gzFile gzfile = fps->fp; if (gzfile == NULL) return -2; rc = gzseek(gzfile, p, whence); if (rc < 0) gzdSetError(fps); #else rc = -2; #endif return rc; }
gzdSeek
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void gzdSetError(FDSTACK_t fps) { int zerror; gzFile gzfile; unsigned long v3; v3 = __readfsqword(0x28u); gzfile = (gzFile)fps->fp; zerror = 0; fps->errcookie = (const char *)gzerror(gzfile, &zerror); if (zerror == -1) { fps->syserrno = *__errno_location(); fps->errcookie = strerror(fps->syserr...
static void gzdSetError(FDSTACK_t fps) { gzFile gzfile = fps->fp; int zerror = 0; fps->errcookie = gzerror(gzfile, &zerror); if (zerror == Z_ERRNO) { fps->syserrno = errno; fps->errcookie = strerror(fps->syserrno); } }
gzdSetError
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
off_t gzdTell(FDSTACK_t fps) { long pos; gzFile gzfile; pos = -1; gzfile = (gzFile)fps->fp; if (gzfile) { pos = gztell(gzfile); if (pos < 0) gzdSetError(fps); } return pos; }
static off_t gzdTell(FDSTACK_t fps) { off_t pos = -1; gzFile gzfile = fps->fp; if (gzfile != NULL) { #if HAVE_GZSEEK pos = gztell(gzfile); if (pos < 0) gzdSetError(fps); #else pos = -2; #endif } return pos; }
gzdTell
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
ssize_t gzdWrite(FDSTACK_t fps, const void *buf, size_t count) { gzFile gzfile; long rc; gzfile = (gzFile)fps->fp; if (!gzfile) return -2; rc = (int)gzwrite(gzfile, buf, (unsigned int)count); if (rc < 0) gzdSetError(fps); return rc; }
static ssize_t gzdWrite(FDSTACK_t fps, const void *buf, size_t count) { gzFile gzfile; ssize_t rc; gzfile = fps->fp; if (gzfile == NULL) return -2; rc = gzwrite(gzfile, (void *)buf, count); if (rc < 0) gzdSetError(fps); return rc; }
gzdWrite
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int hashalgo2gcryalgo(int hashalgo) { int result; switch (hashalgo) { case 1: result = 1; break; case 2: result = 2; break; case 8: result = 8; break; case 9: result = 9; break; case 10: result = 10; break; case 11: result = 11; break; default: resu...
static int hashalgo2gcryalgo(int hashalgo) { switch (hashalgo) { case PGPHASHALGO_MD5: return GCRY_MD_MD5; case PGPHASHALGO_SHA1: return GCRY_MD_SHA1; case PGPHASHALGO_SHA224: return GCRY_MD_SHA224; case PGPHASHALGO_SHA256: return GCRY_MD_SHA256; case PGPHASHALGO_SHA384: return GCRY_MD_S...
hashalgo2gcryalgo
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
unsigned int hashbucket(unsigned int hash, unsigned int number) { return number * number + hash; }
static inline unsigned int hashbucket(unsigned int hash, unsigned int number) { return hash + number * number; }
hashbucket
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *id2str(rpmstrPool pool, rpmsid sid) { const char *s; s = 0; if (sid && sid <= pool->offs_size) return pool->offs[sid]; return s; }
static inline const char *id2str(rpmstrPool pool, rpmsid sid) { const char *s = NULL; if (sid > 0 && sid <= pool->offs_size) s = pool->offs[sid]; return s; }
id2str
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void initLocks() { rpmMacroContext *mcp; rpmMacroContext mc; rpmMacroContext mcs[3]; unsigned long v3; v3 = __readfsqword(0x28u); mcs[0] = rpmGlobalMacroContext; mcs[1] = rpmCLIMacroContext; mcs[2] = 0; for (mcp = mcs; *mcp; ++mcp) { mc = *mcp; pthread_mutexattr_init(&(*mcp)->lockattr); p...
static void initLocks(void) { rpmMacroContext mcs[] = {rpmGlobalMacroContext, rpmCLIMacroContext, NULL}; for (rpmMacroContext *mcp = mcs; *mcp; mcp++) { rpmMacroContext mc = *mcp; pthread_mutexattr_init(&mc->lockattr); pthread_mutexattr_settype(&mc->lockattr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex...
initLocks
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int keyidcmp(const void *k1_0, const void *k2_0) { return memcmp((const void *)(*(_QWORD *)k1_0 + 16LL), (const void *)(*(_QWORD *)k2_0 + 16LL), 8u); }
static int keyidcmp(const void *k1, const void *k2) { const struct rpmPubkey_s *key1 = *(const struct rpmPubkey_s **)k1; const struct rpmPubkey_s *key2 = *(const struct rpmPubkey_s **)k2; return memcmp(key1->keyid, key2->keyid, sizeof(key1->keyid)); }
keyidcmp
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int loadMacroFile(rpmMacroContext mc, const char *fn) { char c; int rc; int nfailed; int lineno; int nlines; char *n; FILE *fd; char *buf; char lnobuf[24]; unsigned long v12; v12 = __readfsqword(0x28u); fd = fopen(fn, "r"); buf = (char *)rmalloc(0x4000u); rc = -1; nfailed = 0; lineno = ...
static int loadMacroFile(rpmMacroContext mc, const char *fn) { FILE *fd = fopen(fn, "r"); size_t blen = MACROBUFSIZ; char *buf = xmalloc(blen); int rc = -1; int nfailed = 0; int lineno = 0; int nlines = 0; if (fd == NULL) goto exit; pushMacro(mc, "__file_name", NULL, fn, RMIL_MACROFILES, ME_LITE...
loadMacroFile
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void logerror() { int v0; int v1; char *v2; if (*__errno_location() != 32) { v0 = *__errno_location(); if (v0 != *(_DWORD *)__tls_get_addr(&qword_3CF30)) { v1 = *__errno_location(); *(_DWORD *)__tls_get_addr(&qword_3CF30) = v1; v2 = dgettext("rpm", "Error writing to log"); perro...
static void logerror(void) { static __thread int lasterr = 0; if (errno != EPIPE && errno != lasterr) { lasterr = errno; perror(_("Error writing to log")); } }
logerror
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int luaopen_posix(lua_State *L) { luaL_checkversion_(L, 136, 504.0); lua_createtable(L, 0, 40); luaL_setfuncs(L, R, 0); lua_pushstring(L, "version"); lua_pushstring(L, "posix library for Lua 5.4 / Nov 2003"); lua_settable(L, 4294967293LL); return 1; }
LUALIB_API int luaopen_posix(lua_State *L) { luaL_newlib(L, R); lua_pushliteral(L, "version"); lua_pushliteral(L, MYVERSION); lua_settable(L, -3); return 1; }
luaopen_posix
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int luaopen_rex(lua_State *L) { createmeta(L, "regex_t"); luaL_setfuncs(L, rexmeta, 0); lua_settop(L, 4294967294LL); luaL_checkversion_(L, 136, 504.0); lua_createtable(L, 0, 1); luaL_setfuncs(L, rexlib, 0); return 1; }
LUALIB_API int luaopen_rex(lua_State *L) { #ifdef WITH_POSIX createmeta(L, "regex_t"); luaL_setfuncs(L, rexmeta, 0); lua_pop(L, 1); #endif #ifdef WITH_PCRE createmeta(L, "pcre"); luaL_setfuncs(L, pcremeta, 0); lua_pop(L, 1); #endif luaL_newlib(L, rexlib); return 1; }
luaopen_rex
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int luaopen_rpm(lua_State *L) { createclass(L, "rpm.ver", ver_m); createclass(L, "rpm.fd", fd_m); createclass(L, "rpm.mc", mc_m); createmt(L, "macros", rpmGlobalMacroContext); luaL_checkversion_(L, 136, 504.0); lua_createtable(L, 0, 17); luaL_setfuncs(L, rpmlib, 0); return 1; }
static int luaopen_rpm(lua_State *L) { createclass(L, "rpm.ver", ver_m); createclass(L, "rpm.fd", fd_m); createclass(L, "rpm.mc", mc_m); createmt(L, "macros", rpmGlobalMacroContext); luaL_newlib(L, rpmlib); return 1; }
luaopen_rpm
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int luaopt(int c, const char *oarg, int oint, void *data) { const char *v4; char key[2]; unsigned long v8; v8 = __readfsqword(0x28u); key[0] = c; key[1] = 0; if (oarg) v4 = oarg; else v4 = (const char *)&unk_330B9; lua_pushstring(data, v4); lua_setfield(data, 4294967294LL, key); return 0;...
static int luaopt(int c, const char *oarg, int oint, void *data) { lua_State *L = data; char key[2] = {c, '\0'}; lua_pushstring(L, oarg ? oarg : ""); lua_setfield(L, -2, key); return 0; }
luaopt
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int lzclose(LZFILE *lzfile) { size_t avail_out; lzma_ret ret; int rc; if (!lzfile) return -1; if (lzfile->encoding) { while (1) { lzfile->strm.avail_out = 0x8000; lzfile->strm.next_out = (uint8_t *)lzfile; ret = (unsigned int)lzma_code(&lzfile->strm, 3); if ((unsigned int)ret ...
static int lzclose(LZFILE *lzfile) { lzma_ret ret; size_t n; int rc; if (!lzfile) return -1; if (lzfile->encoding) { for (;;) { lzfile->strm.avail_out = kBufferSize; lzfile->strm.next_out = lzfile->buf; ret = lzma_code(&lzfile->strm, LZMA_FINISH); if (ret != LZMA_OK && ret != ...
lzclose
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int lzdClose(FDSTACK_t fps) { LZFILE *lzfile; lzfile = (LZFILE *)fps->fp; if (lzfile) return lzclose(lzfile); else return -2; }
static int lzdClose(FDSTACK_t fps) { LZFILE *lzfile = fps->fp; int rc; if (lzfile == NULL) return -2; rc = lzclose(lzfile); return rc; }
lzdClose
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
FD_t lzdFdopen(FD_t fd, int fdno, const char *fmode) { LZFILE *lzfile; lzfile = lzopen_internal(fmode, fdno, 0); if (!lzfile) return 0; fdSetFdno(fd, -1); fdPush(fd, &lzdio_s, lzfile, fdno); return fd; }
static FD_t lzdFdopen(FD_t fd, int fdno, const char *fmode) { LZFILE *lzfile = lzopen_internal(fmode, fdno, 0); if (lzfile == NULL) return NULL; fdSetFdno(fd, -1); fdPush(fd, lzdio, lzfile, fdno); return fd; }
lzdFdopen
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int lzdFlush(FDSTACK_t fps) { return fflush(*((FILE **)fps->fp + 4113)); }
static int lzdFlush(FDSTACK_t fps) { LZFILE *lzfile = fps->fp; return fflush(lzfile->file); }
lzdFlush
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
ssize_t lzdRead(FDSTACK_t fps, void *buf, size_t count) { ssize_t rc; LZFILE *lzfile; lzfile = (LZFILE *)fps->fp; rc = 0; if (lzfile) rc = lzread(lzfile, buf, count); if (rc == -1) fps->errcookie = "Lzma: decoding error"; return rc; }
static ssize_t lzdRead(FDSTACK_t fps, void *buf, size_t count) { LZFILE *lzfile = fps->fp; ssize_t rc = 0; if (lzfile) rc = lzread(lzfile, buf, count); if (rc == -1) { fps->errcookie = "Lzma: decoding error"; } return rc; }
lzdRead
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
ssize_t lzdWrite(FDSTACK_t fps, const void *buf, size_t count) { long rc; rc = lzwrite((LZFILE *)fps->fp, (void *)buf, count); if (rc < 0) fps->errcookie = "Lzma: encoding error"; return rc; }
static ssize_t lzdWrite(FDSTACK_t fps, const void *buf, size_t count) { LZFILE *lzfile = fps->fp; ssize_t rc = 0; rc = lzwrite(lzfile, (void *)buf, count); if (rc < 0) { fps->errcookie = "Lzma: encoding error"; } return rc; }
lzdWrite
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
LZFILE *lzopen_internal(const char *mode, int fd, int xz) { const char *v3; size_t avail_in; uint8_t *next_out; uint64_t total_out; lzma_internal *internal; void *reserved_ptr2; void *reserved_ptr4; uint64_t reserved_int2; size_t reserved_int4; long v13; const char *modeb; unsigned int level; ...
static LZFILE *lzopen_internal(const char *mode, int fd, int xz) { int level = LZMA_PRESET_DEFAULT; int encoding = 0; FILE *fp; LZFILE *lzfile; lzma_ret ret; lzma_stream init_strm = LZMA_STREAM_INIT; uint64_t mem_limit = rpmExpandNumeric("%{_xz_memlimit}"); #ifdef HAVE_LZMA_MT int threads = 0; #endif ...
lzopen_internal
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
ssize_t lzread(LZFILE *lzfile, void *buf, size_t len) { int eof; lzma_ret ret; eof = 0; if (!lzfile || lzfile->encoding) return -1; if (lzfile->eof) return 0; lzfile->strm.next_out = (uint8_t *)buf; lzfile->strm.avail_out = len; do { if (!lzfile->strm.avail_in) { lzfile->strm.next_in ...
static ssize_t lzread(LZFILE *lzfile, void *buf, size_t len) { lzma_ret ret; int eof = 0; if (!lzfile || lzfile->encoding) return -1; if (lzfile->eof) return 0; lzfile->strm.next_out = buf; lzfile->strm.avail_out = len; for (;;) { if (!lzfile->strm.avail_in) { lzfile->strm.next_in = lzf...
lzread
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
ssize_t lzwrite(LZFILE *lzfile, void *buf, size_t len) { size_t avail_out; if (!lzfile || !lzfile->encoding) return -1; if (!len) return 0; lzfile->strm.next_in = (const uint8_t *)buf; lzfile->strm.avail_in = len; do { lzfile->strm.next_out = (uint8_t *)lzfile; lzfile->strm.avail_out = 0x80...
static ssize_t lzwrite(LZFILE *lzfile, void *buf, size_t len) { lzma_ret ret; size_t n; if (!lzfile || !lzfile->encoding) return -1; if (!len) return 0; lzfile->strm.next_in = buf; lzfile->strm.avail_in = len; for (;;) { lzfile->strm.next_out = lzfile->buf; lzfile->strm.avail_out = kBuffer...
lzwrite
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *matchchar(const char *p, char pl, char pr) { const char *v4; char c; int lvl; lvl = 0; while (1) { v4 = p++; c = *v4; if (!*v4) break; if (c == 92) { ++p; } else if (c == pr) { if (--lvl <= 0) return p; } else if (c == pl) { ++lvl; } }...
static const char *matchchar(const char *p, char pl, char pr) { int lvl = 0; char c; while ((c = *p++) != '\0') { if (c == '\\') { p++; continue; } if (c == pr) { if (--lvl <= 0) return p; } else if (c == pl) lvl++; } return (const char *)NULL; }
matchchar
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void mbAllocBuf(MacroBuf mb, size_t slen) { mb->buf = (char *)rmalloc(slen + 16385); *mb->buf = 0; mb->tpos = 0; mb->nb = slen + 0x4000; }
static void mbAllocBuf(MacroBuf mb, size_t slen) { size_t blen = MACROBUFSIZ + slen; mb->buf = xmalloc(blen + 1); mb->buf[0] = '\0'; mb->tpos = 0; mb->nb = blen; }
mbAllocBuf
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void mbAppend(MacroBuf mb, char c) { char *buf; size_t tpos; if (!mb->nb) { mb->buf = (char *)rrealloc(mb->buf, mb->tpos + 16385); mb->nb += 0x4000LL; } buf = mb->buf; tpos = mb->tpos; mb->tpos = tpos + 1; buf[tpos] = c; mb->buf[mb->tpos] = 0; --mb->nb; }
static void mbAppend(MacroBuf mb, char c) { if (mb->nb < 1) { mb->buf = xrealloc(mb->buf, mb->tpos + MACROBUFSIZ + 1); mb->nb += MACROBUFSIZ; } mb->buf[mb->tpos++] = c; mb->buf[mb->tpos] = '\0'; mb->nb--; }
mbAppend
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void mbAppendStr(MacroBuf mb, const char *str) { size_t len; len = strlen(str); if (len > mb->nb) { mb->buf = (char *)rrealloc(mb->buf, mb->nb + mb->tpos + len + 16385); mb->nb += len + 0x4000; } memcpy(&mb->buf[mb->tpos], str, len + 1); mb->tpos += len; mb->nb -= len; }
static void mbAppendStr(MacroBuf mb, const char *str) { size_t len = strlen(str); if (len > mb->nb) { mb->buf = xrealloc(mb->buf, mb->tpos + mb->nb + MACROBUFSIZ + len + 1); mb->nb += MACROBUFSIZ + len; } memcpy(mb->buf + mb->tpos, str, len + 1); mb->tpos += len; mb->nb -= len; }
mbAppendStr
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
MacroBuf mbCreate(rpmMacroContext mc, int flags) { MacroBuf result; result = (MacroBuf)rcalloc(1u, 0x48u); result->buf = 0; result->depth = mc->depth; result->level = mc->level; result->macro_trace = print_macro_trace; result->expand_trace = print_expand_trace; result->mc = mc; result->flags = flags;...
static MacroBuf mbCreate(rpmMacroContext mc, int flags) { MacroBuf mb = xcalloc(1, sizeof(*mb)); mb->buf = NULL; mb->depth = mc->depth; mb->level = mc->level; mb->macro_trace = print_macro_trace; mb->expand_trace = print_expand_trace; mb->mc = mc; mb->flags = flags; return mb; }
mbCreate
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void mbErr(MacroBuf mb, int error, const char *fmt, ...) { long v3; long v4; long v5; int v6; char *emsg; char *pfx; va_list ap; unsigned long v11; long v12; long v13; long v14; va_start(ap, fmt); v3 = va_arg(ap, _QWORD); v4 = va_arg(ap, _QWORD); v5 = va_arg(ap, _QWORD); v12 = v3; v13...
static void mbErr(MacroBuf mb, int error, const char *fmt, ...) { char *emsg = NULL; int n; va_list ap; va_start(ap, fmt); n = rvasprintf(&emsg, fmt, ap); va_end(ap); if (n >= -1) { char *pfx = rpmExpand("%{?__file_name:%{__file_name}: }", "%{?__file_lineno:line %{__file_l...
mbErr
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void mbFini(MacroBuf mb, rpmMacroEntry me, MacroExpansionData *med) { mb->buf[mb->tpos] = 0; --mb->depth; if (mb->error && rpmlogSetMask(0) > 63) mb->expand_trace = 1; if (mb->expand_trace) printExpansion(mb, me, &mb->buf[med->tpos], &mb->buf[mb->tpos]); mb->macro_trace = med->macro_trace; mb->expan...
static void mbFini(MacroBuf mb, rpmMacroEntry me, MacroExpansionData *med) { mb->buf[mb->tpos] = '\0'; mb->depth--; if (mb->error && rpmIsVerbose()) mb->expand_trace = 1; if (mb->expand_trace) printExpansion(mb, me, mb->buf + med->tpos, mb->buf + mb->tpos); mb->macro_trace = med->macro_trace; mb->ex...
mbFini
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int mbInit(MacroBuf mb, MacroExpansionData *med, size_t slen) { char *v3; if (!mb->buf) mbAllocBuf(mb, slen); if (++mb->depth <= max_macro_depth) { med->tpos = mb->tpos; med->macro_trace = mb->macro_trace; med->expand_trace = mb->expand_trace; return 0; } else { v3 = dgettext("rpm", "To...
static int mbInit(MacroBuf mb, MacroExpansionData *med, size_t slen) { if (mb->buf == NULL) mbAllocBuf(mb, slen); if (++mb->depth > max_macro_depth) { mbErr(mb, 1, _("Too many levels of recursion in macro expansion. It is likely " "caused by recursive macro declaration.\n")); mb->d...
mbInit
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int mbopt(int c, const char *oarg, int oint, void *data) { char *name; char *body; MacroBuf mb; unsigned long v8; v8 = __readfsqword(0x28u); mb = (MacroBuf)data; name = 0; body = 0; rasprintf(&name, "-%c", (unsigned int)c); if (oarg) rasprintf(&body, "-%c %s", (unsigned int)c, oarg); else ...
static int mbopt(int c, const char *oarg, int oint, void *data) { MacroBuf mb = data; char *name = NULL, *body = NULL; rasprintf(&name, "-%c", c); if (oarg) { rasprintf(&body, "-%c %s", c, oarg); } else { rasprintf(&body, "-%c", c); } pushMacro(mb->mc, name, NULL, body, mb->level, ME_AUTO | ME_LI...
mbopt
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int mc_call(lua_State *L) { const char *v1; const char *v2; int rc; int i; _BYTE nitem[12]; char *buf; rpmMacroContext *mc; const char *name; unsigned long v10; v10 = __readfsqword(0x28u); mc = checkmc(L, -1001001); name = (const char *)lua_tolstring(L, 4293966294LL, 0); rc = 0; if ((int)lu...
static int mc_call(lua_State *L) { rpmMacroContext *mc = checkmc(L, lua_upvalueindex(1)); const char *name = lua_tostring(L, lua_upvalueindex(2)); int rc = 0; if (lua_gettop(L) > 1) luaL_error(L, "too many arguments"); if (lua_isstring(L, 1)) { lua_pushfstring(L, "%%{%s %s}", name, lua_tostring(L, 1...
mc_call
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int mc_index(lua_State *L) { int rc; rpmMacroContext *mc; const char *a; mc = checkmc(L, 1); a = (const char *)luaL_checklstring(L, 2, 0); rc = 0; if (rpmMacroIsDefined(*mc, a)) { if (rpmMacroIsParametric(*mc, a)) { lua_pushcclosure(L, mc_call, 2); return 1; } else { lua_pushfst...
static int mc_index(lua_State *L) { rpmMacroContext *mc = checkmc(L, 1); const char *a = luaL_checkstring(L, 2); int rc = 0; if (rpmMacroIsDefined(*mc, a)) { if (rpmMacroIsParametric(*mc, a)) { ; lua_pushcclosure(L, &mc_call, 2); rc = 1; } else { lua_pushfstring(L, "%%{%s}", a)...
mc_index
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int mc_newindex(lua_State *L) { rpmMacroContext *mc; const char *name; const char *body; char *s; mc = checkmc(L, 1); name = (const char *)luaL_checklstring(L, 2, 0); if ((unsigned int)lua_type(L, 3)) { body = (const char *)luaL_checklstring(L, 3, 0); s = rstrscat(0, name, " ", body, 0); if (...
static int mc_newindex(lua_State *L) { rpmMacroContext *mc = checkmc(L, 1); const char *name = luaL_checkstring(L, 2); if (lua_isnil(L, 3)) { if (rpmPopMacro(*mc, name)) luaL_error(L, "error undefining macro %s", name); } else { const char *body = luaL_checkstring(L, 3); char *s = rstrscat(NUL...
mc_newindex
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
gid_t mygetgid(lua_State *L, int i) { const char *v3; struct group *g; if ((unsigned int)lua_type(L, (unsigned int)i) == -1) return -1; if ((unsigned int)lua_isnumber(L, (unsigned int)i)) return (int)lua_tonumberx(L, (unsigned int)i, 0); if (!(unsigned int)lua_isstring(L, (unsigned int)i)) return...
static gid_t mygetgid(lua_State *L, int i) { if (lua_isnone(L, i)) return -1; else if (lua_isnumber(L, i)) return (gid_t)lua_tonumber(L, i); else if (lua_isstring(L, i)) { struct group *g = getgrnam(lua_tostring(L, i)); return (g == NULL) ? -1 : g->gr_gid; } else return typerror(L, i, "strin...
mygetgid
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
uid_t mygetuid(lua_State *L, int i) { const char *v3; struct passwd *p; if ((unsigned int)lua_type(L, (unsigned int)i) == -1) return -1; if ((unsigned int)lua_isnumber(L, (unsigned int)i)) return (int)lua_tonumberx(L, (unsigned int)i, 0); if (!(unsigned int)lua_isstring(L, (unsigned int)i)) retur...
static uid_t mygetuid(lua_State *L, int i) { if (lua_isnone(L, i)) return -1; else if (lua_isnumber(L, i)) return (uid_t)lua_tonumber(L, i); else if (lua_isstring(L, i)) { struct passwd *p = getpwnam(lua_tostring(L, i)); return (p == NULL) ? -1 : p->pw_uid; } else return typerror(L, i, "stri...
mygetuid
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int newinstance(lua_State *L, const char *name, void *p) { if (p) { *(_QWORD *)lua_newuserdatauv(L, 8, 1) = p; lua_getfield(L, 4293966296LL, name); lua_setmetatable(L, 4294967294LL); } return p != 0; }
static int newinstance(lua_State *L, const char *name, void *p) { if (p != NULL) { intptr_t **pp = lua_newuserdata(L, sizeof(*pp)); *pp = p; luaL_getmetatable(L, name); lua_setmetatable(L, -2); } return (p != NULL) ? 1 : 0; }
newinstance
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
const char *next_brace_sub(const char *begin) { const char *v2; unsigned int depth; depth = 0; while (*begin) { if (*begin == 125 && !depth--) break; if (*begin == 44 && !depth) break; v2 = begin++; if (*v2 == 123) ++depth; } if (*begin) return begin; else return...
static inline const char *next_brace_sub(const char *begin) { unsigned int depth = 0; const char *cp = begin; while (*cp != '\0') { if ((*cp == '}' && depth-- == 0) || (*cp == ',' && depth == 0)) break; if (*cp++ == '{') depth++; } return *cp != '\0' ? cp : NULL; }
next_brace_sub
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void parseEVR(char *evr, const char **ep, const char **vp, const char **rp) { char *epoch; char *version; const char *release; char *s; char *se; for (s = evr; *s && risdigit_2(*s); ++s) ; se = strrchr(s, 45); if (*s == 58) { epoch = evr; *s = 0; version = s + 1; if (!*evr) ep...
static void parseEVR(char *evr, const char **ep, const char **vp, const char **rp) { const char *epoch; const char *version; const char *release; char *s, *se; s = evr; while (*s && risdigit(*s)) s++; se = strrchr(s, '-'); if (*s == ':') { epoch = evr; *s++ = '\0'; ...
parseEVR
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
char *pgpArmorWrap(int atype, const unsigned char *s, size_t ns) { char *v3; char *buf; char *val; char *enc; char *crc; const char *valstr; unsigned long v11; v11 = __readfsqword(0x28u); buf = 0; val = 0; enc = rpmBase64Encode(s, ns, -1); crc = rpmBase64CRC(s, ns); valstr = pgpValStr(pgpArmo...
char *pgpArmorWrap(int atype, const unsigned char *s, size_t ns) { char *buf = NULL, *val = NULL; char *enc = rpmBase64Encode(s, ns, -1); char *crc = rpmBase64CRC(s, ns); const char *valstr = pgpValStr(pgpArmorTbl, atype); if (crc != NULL && enc != NULL) { rasprintf(&buf, "%s=%s", enc, crc); } free(c...
pgpArmorWrap
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
unsigned int pgpCRC(const uint8_t *octets, size_t len) { const uint8_t *v2; unsigned int crc; size_t i; crc = 11994318; while (len--) { v2 = octets++; crc ^= *v2 << 16; for (i = 0; i <= 7; ++i) { crc *= 2; if ((crc & 0x1000000) != 0) crc ^= 0x1864CFBu; } } return crc &...
static inline unsigned int pgpCRC(const uint8_t *octets, size_t len) { unsigned int crc = CRC24_INIT; size_t i; while (len--) { crc ^= (*octets++) << 16; for (i = 0; i < 8; i++) { crc <<= 1; if (crc & 0x1000000) crc ^= CRC24_POLY; } } return crc & 0xffffff; }
pgpCRC
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpCleanDig(pgpDig_0 dig) { if (dig) { pgpDigParamsFree(dig->signature); pgpDigParamsFree(dig->pubkey); memset(dig, 0, sizeof(pgpDig_s)); } }
void pgpCleanDig(pgpDig dig) { if (dig != NULL) { pgpDigParamsFree(dig->signature); pgpDigParamsFree(dig->pubkey); memset(dig, 0, sizeof(*dig)); } return; }
pgpCleanDig
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpCurveByOid(const uint8_t *p, int l) { uint8_t *curve; for (curve = curve_oids; *curve; curve += curve[1] + 2) { if (l == curve[1] && !memcmp(p, curve + 2, l)) return *curve; } return 0; }
static int pgpCurveByOid(const uint8_t *p, int l) { uint8_t *curve; for (curve = curve_oids; *curve; curve += 2 + curve[1]) if (l == (int)curve[1] && !memcmp(p, curve + 2, l)) return (int)curve[0]; return 0; }
pgpCurveByOid
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDigAlg pgpDigAlgFree(pgpDigAlg alg) { if (alg) { if (alg->free) alg->free(alg); free(alg); } return 0; }
pgpDigAlg pgpDigAlgFree(pgpDigAlg alg) { if (alg) { if (alg->free) alg->free(alg); free(alg); } return NULL; }
pgpDigAlgFree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDigParams pgpDigGetParams(pgpDig_0 dig, unsigned int pkttype) { pgpDigParams_s *params; params = 0; if (dig) { if (pkttype == 2) { return dig->signature; } else if (pkttype == 6) { return dig->pubkey; } } return params; }
pgpDigParams pgpDigGetParams(pgpDig dig, unsigned int pkttype) { pgpDigParams params = NULL; if (dig) { switch (pkttype) { case PGPTAG_SIGNATURE: params = dig->signature; break; case PGPTAG_PUBLIC_KEY: params = dig->pubkey; break; } } return params; }
pgpDigGetParams
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype) { unsigned int algo; algo = 0; if (digp) { if (algotype == 6) { return digp->pubkey_algo; } else if (algotype == 9) { return digp->hash_algo; } } return algo; }
unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype) { unsigned int algo = 0; if (digp) { switch (algotype) { case PGPVAL_PUBKEYALGO: algo = digp->pubkey_algo; break; case PGPVAL_HASHALGO: algo = digp->hash_algo; break; } } return algo; }
pgpDigParamsAlgo
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpDigParamsCmp(pgpDigParams p1, pgpDigParams p2) { int rc; rc = 1; if (p1 && p2 && p1->tag == p2->tag && p1->hash_algo == p2->hash_algo && p1->pubkey_algo == p2->pubkey_algo && p1->version == p2->version && p1->sigtype == p2->sigtype && !memcmp(p1->signid, p2->signid, 8u) && (!p1->userid |...
int pgpDigParamsCmp(pgpDigParams p1, pgpDigParams p2) { int rc = 1; if (p1 && p2) { if (p1->tag != p2->tag) goto exit; if (p1->hash_algo != p2->hash_algo) goto exit; if (p1->pubkey_algo != p2->pubkey_algo) goto exit; if (p1->version != p2->version) goto exit; if (p1->sig...
pgpDigParamsCmp
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDigParams pgpDigParamsFree(pgpDigParams digp) { if (digp) { pgpDigAlgFree(digp->alg); free(digp->userid); free(digp->hash); memset(digp, 0, sizeof(pgpDigParams_s)); free(digp); } return 0; }
pgpDigParams pgpDigParamsFree(pgpDigParams digp) { if (digp) { pgpDigAlgFree(digp->alg); free(digp->userid); free(digp->hash); memset(digp, 0, sizeof(*digp)); free(digp); } return NULL; }
pgpDigParamsFree
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDig_0 pgpFreeDig(pgpDig_0 dig) { pgpDig_s *diga; diga = dig; if (dig) { pgpCleanDig(dig); return (pgpDig_0)rfree(dig); } return diga; }
pgpDig pgpFreeDig(pgpDig dig) { if (dig != NULL) { pgpCleanDig(dig); dig = _free(dig); } return dig; }
pgpFreeDig
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpFreeKeyDSA(pgpDigAlg pgpkey) { pgpDigKeyDSA_s *key; key = (pgpDigKeyDSA_s *)pgpkey->data; if (key) { gcry_mpi_release(key->p); gcry_mpi_release(key->q); gcry_mpi_release(key->g); gcry_mpi_release(key->y); pgpkey->data = rfree(key); } }
static void pgpFreeKeyDSA(pgpDigAlg pgpkey) { struct pgpDigKeyDSA_s *key = pgpkey->data; if (key) { gcry_mpi_release(key->p); gcry_mpi_release(key->q); gcry_mpi_release(key->g); gcry_mpi_release(key->y); pgpkey->data = _free(key); } }
pgpFreeKeyDSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpFreeKeyEDDSA(pgpDigAlg pgpkey) { pgpDigKeyEDDSA_s *key; key = (pgpDigKeyEDDSA_s *)pgpkey->data; if (key) { gcry_mpi_release(key->q); pgpkey->data = rfree(key); } }
static void pgpFreeKeyEDDSA(pgpDigAlg pgpkey) { struct pgpDigKeyEDDSA_s *key = pgpkey->data; if (key) { gcry_mpi_release(key->q); pgpkey->data = _free(key); } }
pgpFreeKeyEDDSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpFreeKeyRSA(pgpDigAlg pgpkey) { pgpDigKeyRSA_s *key; key = (pgpDigKeyRSA_s *)pgpkey->data; if (key) { gcry_mpi_release(key->n); gcry_mpi_release(key->e); pgpkey->data = rfree(key); } }
static void pgpFreeKeyRSA(pgpDigAlg pgpkey) { struct pgpDigKeyRSA_s *key = pgpkey->data; if (key) { gcry_mpi_release(key->n); gcry_mpi_release(key->e); pgpkey->data = _free(key); } }
pgpFreeKeyRSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpFreeSigDSA(pgpDigAlg pgpsig) { pgpDigSigDSA_s *sig; sig = (pgpDigSigDSA_s *)pgpsig->data; if (sig) { gcry_mpi_release(sig->r); gcry_mpi_release(sig->s); pgpsig->data = rfree(sig); } }
static void pgpFreeSigDSA(pgpDigAlg pgpsig) { struct pgpDigSigDSA_s *sig = pgpsig->data; if (sig) { gcry_mpi_release(sig->r); gcry_mpi_release(sig->s); pgpsig->data = _free(sig); } }
pgpFreeSigDSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpFreeSigEDDSA(pgpDigAlg pgpsig) { pgpDigSigEDDSA_s *sig; sig = (pgpDigSigEDDSA_s *)pgpsig->data; if (sig) { gcry_mpi_release(sig->r); gcry_mpi_release(sig->s); pgpsig->data = rfree(sig); } }
static void pgpFreeSigEDDSA(pgpDigAlg pgpsig) { struct pgpDigSigEDDSA_s *sig = pgpsig->data; if (sig) { gcry_mpi_release(sig->r); gcry_mpi_release(sig->s); pgpsig->data = _free(sig); } }
pgpFreeSigEDDSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpFreeSigRSA(pgpDigAlg pgpsig) { pgpDigSigRSA_s *sig; sig = (pgpDigSigRSA_s *)pgpsig->data; if (sig) { gcry_mpi_release(sig->s); pgpsig->data = rfree(sig); } }
static void pgpFreeSigRSA(pgpDigAlg pgpsig) { struct pgpDigSigRSA_s *sig = pgpsig->data; if (sig) { gcry_mpi_release(sig->s); pgpsig->data = _free(sig); } }
pgpFreeSigRSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpGet(const uint8_t *s, size_t nbytes, const uint8_t *send, unsigned int *valp) { int rc; unsigned int val; rc = -1; *valp = 0; if (nbytes <= 4 && nbytes <= send - s) { val = pgpGrab(s, nbytes); if (send - s - nbytes >= val) { rc = 0; *valp = val; } } return rc; }
static int pgpGet(const uint8_t *s, size_t nbytes, const uint8_t *send, unsigned int *valp) { int rc = -1; *valp = 0; if (nbytes <= 4 && send - s >= nbytes) { unsigned int val = pgpGrab(s, nbytes); if (send - s - nbytes >= val) { rc = 0; *valp = val; } } return rc; ...
pgpGet
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
char *pgpHexStr(const uint8_t *p, size_t plen) { const uint8_t *v2; _BYTE *v3; size_t plena; char *t; char *str; uint8_t i; plena = plen; t = (char *)rmalloc(2 * plen + 1); str = t; while (plena--) { v2 = p++; i = *v2; *t = hex_0[*v2 >> 4]; v3 = t + 1; t += 2; *v3 = hex_0[i ...
char *pgpHexStr(const uint8_t *p, size_t plen) { char *t, *str; str = t = xmalloc(plen * 2 + 1); static char const hex[] = "0123456789abcdef"; while (plen-- > 0) { size_t i; i = *p++; *t++ = hex[(i >> 4) & 0xf]; *t++ = hex[(i) & 0xf]; } *t = '\0'; return str; }
pgpHexStr
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
char *pgpIdentItem(pgpDigParams digp) { const char *v1; const char *v2; const char *v3; unsigned int version; char *v5; char *v6; char *id; char *signid; unsigned long v10; v10 = __readfsqword(0x28u); id = 0; if (digp) { signid = pgpHexStr(&digp->signid[4], 4u); v1 = pgpValStr(pgpTagTbl...
char *pgpIdentItem(pgpDigParams digp) { char *id = NULL; if (digp) { char *signid = pgpHexStr(digp->signid + 4, sizeof(digp->signid) - 4); rasprintf(&id, _("V%d %s/%s %s, key ID %s"), digp->version, pgpValStr(pgpPubkeyTbl, digp->pubkey_algo), pgpValStr(pgpHashTbl, digp->hash_alg...
pgpIdentItem
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
size_t pgpLen(const uint8_t *s, size_t slen, size_t *lenp) { size_t dlen; size_t lenlen; dlen = 0; lenlen = 0; if (*s > 0xBFu) { if (*s > 0xDFu || slen <= 2) { if (*s == 0xFF && slen > 5) { lenlen = 5; dlen = pgpGrab(s + 1, 4u); } } else { lenlen = 2; dlen = ((...
static inline size_t pgpLen(const uint8_t *s, size_t slen, size_t *lenp) { size_t dlen = 0; size_t lenlen = 0; if (*s < 192) { lenlen = 1; dlen = *s; } else if (*s < 224 && slen > 2) { lenlen = 2; dlen = (((s[0]) - 192) << 8) + s[1] + 192; } else if (*s == 255 && slen > 5) { lenlen = 5; ...
pgpLen
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDig_0 pgpNewDig() { return (pgpDig_0)rcalloc(1u, 0x10u); }
pgpDig pgpNewDig(void) { pgpDig dig = xcalloc(1, sizeof(*dig)); return dig; }
pgpNewDig
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpArmor pgpParsePkts(const char *armor, uint8_t **pkt, size_t *pktlen) { pgpArmor ec; uint8_t *b; ec = pgpArmor_e_PGPARMOR_ERR_NO_BEGIN_PGP; if (armor && *armor) { b = (uint8_t *)rstrdup(armor); ec = decodePkts(b, pkt, pktlen); free(b); } return ec; }
pgpArmor pgpParsePkts(const char *armor, uint8_t **pkt, size_t *pktlen) { pgpArmor ec = PGPARMOR_ERR_NO_BEGIN_PGP; if (armor && strlen(armor) > 0) { uint8_t *b = (uint8_t *)xstrdup(armor); ec = decodePkts(b, pkt, pktlen); free(b); } return ec; }
pgpParsePkts
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpPrtHex(const char *pre, const uint8_t *p, size_t plen) { char *hex; if (print) { if (pre) { if (*pre) fputs(pre, stderr); } hex = pgpHexStr(p, plen); fprintf(stderr, " %s", hex); free(hex); } }
static void pgpPrtHex(const char *pre, const uint8_t *p, size_t plen) { char *hex = NULL; if (!_print) return; if (pre && *pre) fprintf(stderr, "%s", pre); hex = pgpHexStr(p, plen); fprintf(stderr, " %s", hex); free(hex); }
pgpPrtHex
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtKey(pgpTag tag, const uint8_t *h, size_t hlen, pgpDigParams _digp) { unsigned int v5; char *v6; uint8_t version; int rc; const uint8_t *p; pgpPktKeyV4 v; unsigned long v13; v13 = __readfsqword(0x28u); version = 0; p = 0; rc = 1; if (pgpVersion(h, hlen, &version)) return rc; if (...
static int pgpPrtKey(pgpTag tag, const uint8_t *h, size_t hlen, pgpDigParams _digp) { uint8_t version = 0; const uint8_t *p = NULL; int rc = 1; if (pgpVersion(h, hlen, &version)) return rc; switch (version) { case 4: { pgpPktKeyV4 v = (pgpPktKeyV4)h; if (hlen > sizeof(*v)...
pgpPrtKey
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpPrtNL() { if (print) fputc(10, stderr); }
static void pgpPrtNL(void) { if (!_print) return; fprintf(stderr, "\n"); }
pgpPrtNL
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtParams(const uint8_t *pkts, size_t pktlen, unsigned int pkttype, pgpDigParams *ret) { int v4; int rc; const uint8_t *p; pgpDigParams digp; const uint8_t *pend; pgpPkt pkt; unsigned long v13; v13 = __readfsqword(0x28u); p = pkts; pend = &pkts[pktlen]; digp = 0; while (...
int pgpPrtParams(const uint8_t *pkts, size_t pktlen, unsigned int pkttype, pgpDigParams *ret) { const uint8_t *p = pkts; const uint8_t *pend = pkts + pktlen; pgpDigParams digp = NULL; struct pgpPkt pkt; int rc = -1; while (p < pend) { if (decodePkt(p, (pend - p), &pkt)) break; ...
pgpPrtParams
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen, pgpDigParams mainkey, pgpDigParams **subkeys, int *subkeysCount) { _QWORD *p_userid; int v6; int count; int alloced; int i; int rc; const uint8_t *p; pgpDigParams *digps; const uint8_t *pend; ...
int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen, pgpDigParams mainkey, pgpDigParams **subkeys, int *subkeysCount) { const uint8_t *p = pkts; const uint8_t *pend = pkts + pktlen; pgpDigParams *digps = NULL; int count = 0; int alloced = 10; struct pgp...
pgpPrtParamsSubkeys
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtPkt(pgpPkt *p, pgpDigParams _digp) { int tag; int rc; rc = 0; tag = p->tag; if (tag == 13) return pgpPrtUserID((pgpTag)p->tag, p->body, p->blen, _digp); if (p->tag > 0xDu) goto LABEL_14; if (tag != 6) { if (p->tag <= 6u) { if (!p->tag) return -1; if (tag == 2) ...
static int pgpPrtPkt(struct pgpPkt *p, pgpDigParams _digp) { int rc = 0; switch (p->tag) { case PGPTAG_SIGNATURE: rc = pgpPrtSig(p->tag, p->body, p->blen, _digp); break; case PGPTAG_PUBLIC_KEY: if (!getKeyID(p->body, p->blen, _digp->signid)) _digp->saved |= PGPDIG_SAVED_ID; else me...
pgpPrtPkt
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtPkts(const uint8_t *pkts, size_t pktlen, pgpDig_0 dig, int printing) { int rc; pgpDigParams digp[2]; digp[1] = (pgpDigParams)__readfsqword(0x28u); digp[0] = 0; print = printing; rc = pgpPrtParams(pkts, pktlen, 0, digp); if (!dig || rc) { pgpDigParamsFree(digp[0]); } else if (digp[0]->tag ...
int pgpPrtPkts(const uint8_t *pkts, size_t pktlen, pgpDig dig, int printing) { int rc; pgpDigParams digp = NULL; _print = printing; rc = pgpPrtParams(pkts, pktlen, 0, &digp); if (dig && rc == 0) { if (digp->tag == PGPTAG_SIGNATURE) { pgpDigParamsFree(dig->signature); dig->signature = digp; ...
pgpPrtPkts
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtPubkeyParams(uint8_t pubkey_algo, const uint8_t *p, const uint8_t *h, size_t hlen, pgpDigParams keyp) { int v5; const uint8_t *pa; int rc; int i; int curve; int len; int mpil; const uint8_t *pend; pgpDigAlg keyalg; pa = p; rc = 1; pend = &h[hlen]; curve = 0; ...
static int pgpPrtPubkeyParams(uint8_t pubkey_algo, const uint8_t *p, const uint8_t *h, size_t hlen, pgpDigParams keyp) { int rc = 1; const uint8_t *pend = h + hlen; int i, curve = 0; pgpDigAlg keyalg; if (pubkey_algo == PGPPUBKEYALGO_EDDSA) { int...
pgpPrtPubkeyParams
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, pgpDigParams _digp) { size_t hashlen; uint8_t *p_sigtype; void *v7; size_t v8; void *v9; unsigned int v10; char *v11; uint8_t version; unsigned int plen; int rc; pgpPktSigV4 v_0; const uint8_t *hend; const uint8_t *p; pgpPktSigV3 v; ...
static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, pgpDigParams _digp) { uint8_t version = 0; const uint8_t *p; unsigned int plen; int rc = 1; if (pgpVersion(h, hlen, &version)) return rc; switch (version) { case 3: { pgpPktSigV3 v = (pgpPktSigV3)h; if (hle...
pgpPrtSig
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, const uint8_t *p, const uint8_t *h, size_t hlen, pgpDigParams sigp) { int rc; int i; int mpil; const uint8_t *pend; pgpDigAlg sigalg; rc = 1; pend = &h[hlen]; sigalg = pgpSignatureNew(pubkey_al...
static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, const uint8_t *p, const uint8_t *h, size_t hlen, pgpDigParams sigp) { int rc = 1; const uint8_t *pend = h + hlen; int i; pgpDigAlg sigalg = pgpSignatureNew(pubkey_algo); for (i =...
pgpPrtSigParams
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtSubType(const uint8_t *h, size_t hlen, pgpSigType sigtype, pgpDigParams _digp) { size_t hlenb; int rc; int impl; size_t plen; const uint8_t *p; size_t i; unsigned long v14; v14 = __readfsqword(0x28u); p = h; plen = 0; rc = 0; while (hlen) { if (rc) break; ...
static int pgpPrtSubType(const uint8_t *h, size_t hlen, pgpSigType sigtype, pgpDigParams _digp) { const uint8_t *p = h; size_t plen = 0, i; int rc = 0; while (hlen > 0 && rc == 0) { int impl = 0; i = pgpLen(p, hlen, &plen); if (i == 0 || plen < 1 || i + plen > hlen) b...
pgpPrtSubType
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpPrtTime(const char *pre, const uint8_t *p, size_t plen) { time_t t; tm *tms; tm _tm; char buf[1032]; unsigned long v8; v8 = __readfsqword(0x28u); if (print) { if (pre && *pre) fputs(pre, stderr); if (plen == 4) { t = pgpGrab(p, 4u); tms = localtime_r(&t, &_tm); if ...
static void pgpPrtTime(const char *pre, const uint8_t *p, size_t plen) { if (!_print) return; if (pre && *pre) fprintf(stderr, "%s", pre); if (plen == 4) { char buf[1024]; time_t t = pgpGrab(p, plen); struct tm _tm, *tms = localtime_r(&t, &_tm); if (strftime(buf, sizeof(buf), "%c", tms) > ...
pgpPrtTime
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPrtUserID(pgpTag tag, const uint8_t *h, size_t hlen, pgpDigParams _digp) { void *v4; pgpPrtVal(&pre, pgpTagTbl, tag); if (print) fprintf(stderr, " \"%.*s\"", hlen, (const char *)h); pgpPrtNL(); free(_digp->userid); v4 = rmalloc(hlen + 1); _digp->userid = (char *)memcpy(v4, h, ...
static int pgpPrtUserID(pgpTag tag, const uint8_t *h, size_t hlen, pgpDigParams _digp) { pgpPrtVal("", pgpTagTbl, tag); if (_print) fprintf(stderr, " \"%.*s\"", (int)hlen, (const char *)h); pgpPrtNL(); free(_digp->userid); _digp->userid = memcpy(xmalloc(hlen + 1), h, hlen); _digp...
pgpPrtUserID
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
void pgpPrtVal(const char *pre, pgpValTbl vs, uint8_t val) { const char *v3; if (print) { if (pre) { if (*pre) fputs(pre, stderr); } v3 = pgpValStr(vs, val); fprintf(stderr, "%s(%u)", v3, val); } }
static void pgpPrtVal(const char *pre, pgpValTbl vs, uint8_t val) { if (!_print) return; if (pre && *pre) fprintf(stderr, "%s", pre); fprintf(stderr, "%s(%u)", pgpValStr(vs, val), (unsigned)val); }
pgpPrtVal
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPubKeyCertLen(const uint8_t *pkts, size_t pktslen, size_t *certlen) { const uint8_t *p; const uint8_t *pend; pgpPkt pkt; unsigned long v8; v8 = __readfsqword(0x28u); p = pkts; pend = &pkts[pktslen]; while (p < pend) { if (decodePkt(p, pend - p, &pkt)) return -1; if (pkt.tag == 6 &&...
int pgpPubKeyCertLen(const uint8_t *pkts, size_t pktslen, size_t *certlen) { const uint8_t *p = pkts; const uint8_t *pend = pkts + pktslen; struct pgpPkt pkt; while (p < pend) { if (decodePkt(p, (pend - p), &pkt)) return -1; if (pkt.tag == PGPTAG_PUBLIC_KEY && pkts != p) { *certlen = p - p...
pgpPubKeyCertLen
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPubkeyFingerprint(const uint8_t *h, size_t hlen, uint8_t **fp, size_t *fplen) { int pubkey_algo; size_t v6; int v7; unsigned int v8; char *v9; uint8_t version; int rc; int mpis; _BYTE i[12]; size_t dlen; const uint8_t *se; const uint8_t *pend; pgpPktKeyV4 v; D...
int pgpPubkeyFingerprint(const uint8_t *h, size_t hlen, uint8_t **fp, size_t *fplen) { int rc = -1; const uint8_t *se; const uint8_t *pend = h + hlen; uint8_t version = 0; if (pgpVersion(h, hlen, &version)) return rc; switch (version) { case 4: { pgpPktKeyV4 v = (pgpPktK...
pgpPubkeyFingerprint
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpPubkeyKeyID(const uint8_t *pkt, size_t pktlen, uint8_t *keyid) { pgpPkt p; unsigned long v6; v6 = __readfsqword(0x28u); if (decodePkt(pkt, pktlen, &p)) return -1; else return getKeyID(p.body, p.blen, keyid); }
int pgpPubkeyKeyID(const uint8_t *pkt, size_t pktlen, pgpKeyID_t keyid) { struct pgpPkt p; if (decodePkt(pkt, pktlen, &p)) return -1; return getKeyID(p.body, p.blen, keyid); }
pgpPubkeyKeyID
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpDigAlg pgpPubkeyNew(int algo, int curve) { pgpDigAlg ka; ka = (pgpDigAlg)rcalloc(1u, 0x28u); if (algo == 22) { if (pgpSupportedCurve(curve)) { ka->setmpi = (setmpifunc)pgpSetKeyMpiEDDSA; ka->free = (freefunc)pgpFreeKeyEDDSA; ka->mpis = 1; ka->curve = curve; } else { ka->s...
pgpDigAlg pgpPubkeyNew(int algo, int curve) { pgpDigAlg ka = xcalloc(1, sizeof(*ka)); ; switch (algo) { case PGPPUBKEYALGO_RSA: ka->setmpi = pgpSetKeyMpiRSA; ka->free = pgpFreeKeyRSA; ka->mpis = 2; break; case PGPPUBKEYALGO_DSA: ka->setmpi = pgpSetKeyMpiDSA; ka->free = pgpFreeKeyDSA; ...
pgpPubkeyNew
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
pgpArmor pgpReadPkts(const char *fn, uint8_t **pkt, size_t *pktlen) { pgpArmor ec; uint8_t *b; ssize_t blen[2]; blen[1] = __readfsqword(0x28u); b = 0; ec = pgpArmor_e_PGPARMOR_ERR_NO_BEGIN_PGP; if (!rpmioSlurp(fn, &b, blen) && b && blen[0] > 0) ec = decodePkts(b, pkt, pktlen); free(b); return ec;...
pgpArmor pgpReadPkts(const char *fn, uint8_t **pkt, size_t *pktlen) { uint8_t *b = NULL; ssize_t blen; pgpArmor ec = PGPARMOR_ERR_NO_BEGIN_PGP; int rc = rpmioSlurp(fn, &b, &blen); if (rc == 0 && b != NULL && blen > 0) { ec = decodePkts(b, pkt, pktlen); } free(b); return ec; }
pgpReadPkts
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num, const uint8_t *p) { int rc; int mlen; pgpDigKeyDSA_s *key; key = (pgpDigKeyDSA_s *)pgpkey->data; mlen = pgpMpiLen_0(p); rc = 1; if (!key) { pgpkey->data = rcalloc(1u, 0x20u); key = (pgpDigKeyDSA_s *)pgpkey->data; } if (num == 3) { if (!(unsig...
static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num, const uint8_t *p) { struct pgpDigKeyDSA_s *key = pgpkey->data; int mlen = pgpMpiLen(p); int rc = 1; if (!key) key = pgpkey->data = xcalloc(1, sizeof(*key)); switch (num) { case 0: if (!gcry_mpi_scan(&key->p, GCRYMPI_FMT_PGP, p, mlen, NULL)) ...
pgpSetKeyMpiDSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpSetKeyMpiEDDSA(pgpDigAlg pgpkey, int num, const uint8_t *p) { int rc; int mlen; pgpDigKeyEDDSA_s *key; key = (pgpDigKeyEDDSA_s *)pgpkey->data; mlen = pgpMpiLen_0(p); rc = 1; if (!key) { pgpkey->data = rcalloc(1u, 8u); key = (pgpDigKeyEDDSA_s *)pgpkey->data; } if (!num && !(unsigned int...
static int pgpSetKeyMpiEDDSA(pgpDigAlg pgpkey, int num, const uint8_t *p) { struct pgpDigKeyEDDSA_s *key = pgpkey->data; int mlen = pgpMpiLen(p); int rc = 1; if (!key) key = pgpkey->data = xcalloc(1, sizeof(*key)); switch (num) { case 0: if (!gcry_mpi_scan(&key->q, GCRYMPI_FMT_PGP, p, mlen, NULL))...
pgpSetKeyMpiEDDSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num, const uint8_t *p) { int rc; int mlen; pgpDigKeyRSA_s *key; key = (pgpDigKeyRSA_s *)pgpkey->data; mlen = pgpMpiLen_0(p); rc = 1; if (!key) { pgpkey->data = rcalloc(1u, 0x10u); key = (pgpDigKeyRSA_s *)pgpkey->data; } if (num) { if (num == 1 && ...
static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num, const uint8_t *p) { struct pgpDigKeyRSA_s *key = pgpkey->data; int mlen = pgpMpiLen(p); int rc = 1; if (!key) key = pgpkey->data = xcalloc(1, sizeof(*key)); switch (num) { case 0: if (!gcry_mpi_scan(&key->n, GCRYMPI_FMT_PGP, p, mlen, NULL)) ...
pgpSetKeyMpiRSA
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0
int pgpSetMpiNULL(pgpDigAlg pgpkey, int num, const uint8_t *p) { return 1; }
static int pgpSetMpiNULL(pgpDigAlg pgpkey, int num, const uint8_t *p) { return 1; }
pgpSetMpiNULL
rpm-4.17.0-r2
app-arch
O0/app-arch/rpm-4.17.0-r2/librpmio.so.9.2.0
ida
O0