diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-07 13:51:20 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-07 13:51:20 +0300 |
commit | a41079c692aa75e5e995aaf1e5c355edad5552d9 (patch) | |
tree | 45745ee5a3a4c4342285d7590d159be48d36b085 /rpmio | |
parent | 9bb88f4088de792c2844357ad447470e76a7281a (diff) | |
download | rpm-a41079c692aa75e5e995aaf1e5c355edad5552d9.tar.gz rpm-a41079c692aa75e5e995aaf1e5c355edad5552d9.tar.bz2 rpm-a41079c692aa75e5e995aaf1e5c355edad5552d9.zip |
Uh, return allocated pointer, not the end of string...
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmpgp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c index 4bb8a8231..171f54679 100644 --- a/rpmio/rpmpgp.c +++ b/rpmio/rpmpgp.c @@ -648,7 +648,8 @@ static const char * const pgpSecretELGAMAL[] = { char * pgpHexStr(const uint8_t *p, size_t plen) { - char *t = xmalloc(plen * 2 + 1); + char *t, *str; + str = t = xmalloc(plen * 2 + 1); static char const hex[] = "0123456789abcdef"; while (plen-- > 0) { size_t i; @@ -657,7 +658,7 @@ char * pgpHexStr(const uint8_t *p, size_t plen) *t++ = hex[ (i ) & 0xf ]; } *t = '\0'; - return t; + return str; } static const uint8_t * pgpPrtPubkeyParams(uint8_t pubkey_algo, |